Skip to content

Refresh client cache with hooks #5324

Answered by francoischalifour
sbkl asked this question in Q&A
Discussion options

You must be logged in to vote

That's possible that since #3554, calling useInstantSearch() doesn't trigger a render, and therefore doesn't refreshes the screen. We need to programmatically rerender now when calling refresh().

For now, you could manually force an update, until we fix that in the lib.

Edit: this guess was incorrect, it's because of the useInfiniteHits() which uses its own cache.

Replies: 0 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@sbkl
Comment options

@Haroenv
Comment options

@sbkl
Comment options

Answer selected by sbkl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Library: React InstantSearch ≥ 7 Issues in any of the react-instantsearch@7 packages (formerly named react-instantsearch-hooks)
3 participants