InstantSearch provides the LoadingState as a state model, which is an implementation of the LoadingView interface.
You need to connect LoadingState to the LoadingConnector or LoadingViewModel like any other LoadingView implementation.
Kotlin
class MyActivity : AppCompatActivity() { val searcher = HitsSearcher( applicationID = "YourApplicationID", apiKey = "YourSearchOnlyAPIKey", indexName = "YourIndexName" ) val loadingState = LoadingState() val loading = LoadingConnector(searcher) val connections = ConnectionHandler(loading) init { connections += loading.connectView(loadingState) } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { SwipeRefresh( state = rememberSwipeRefreshState(loadingState.loading), onRefresh = { loadingState.reload() }, ) { //... } } searcher.searchAsync() } override fun onDestroy() { super.onDestroy() connections.disconnect() searcher.cancel() }}