You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the numerous frustrations I got from trying to use algolia with Remix is that I cannot use useFetcher() in any component that is a child of <InstantSearch>.
The InstantSearch component affects the react-router behavior (which Remix uses under the hood).
On new versions of Remix, the thrown error is the following useFetcher must be used inside a RouteContext. So I guess InstantSearchContext doesn't pair well with Remix RouteContext.
Small edit: it seems related to SSR since an easy workaround is to render the component only client-side with ClientOnly for example.
Thanks for any help on this!
馃攳 Steps to reproduce
Just use Remix useFetcher in any component inside . See sandbox for reproduction.
馃悰 Current behavior
Hi,
One of the numerous frustrations I got from trying to use algolia with Remix is that I cannot use
useFetcher()
in any component that is a child of<InstantSearch>
.The InstantSearch component affects the react-router behavior (which Remix uses under the hood).
On new versions of Remix, the thrown error is the following
useFetcher must be used inside a RouteContext
. So I guessInstantSearchContext
doesn't pair well with RemixRouteContext
.Small edit: it seems related to SSR since an easy workaround is to render the component only client-side with ClientOnly for example.
Thanks for any help on this!
馃攳 Steps to reproduce
Just use Remix
useFetcher
in any component inside . See sandbox for reproduction.Live reproduction
https://codesandbox.io/p/sandbox/remix-algolia-usefetcher-h3x9rh
馃挱 Expected behavior
useFetcher()
works out of the box and allows me to fetch or post data.Package version
react-instantsearch 7.2.0, remix 2.2.0, algoliasearch 4.20.0
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: