React native 0.73.2 ( expo 50 ), do not send any network requests
axelhildingson opened this issue Β· comments
π Current behavior
Hi
I just update my app to Expo 50 from 49 and realised that didn't get any search results. I haven't seen any error logs or warnings from instant search. When I looked at the network traffic I could see that instantsearch.js queries was sent and we got results ( client.multipleQueries([....])
) but I couldn't se any request from react instantsearch.
π Steps to reproduce
Create a simple expo app
<InstantSearch searchClient={....} indexName={...}>
<SimpleComponentWithuseInfiniteHits />
</InstantSearch>
The result I get is hits: []
and the _rawResults: [{"exhaustiveFacetsCount": true, "exhaustiveNbHits": true, "hits": [], "hitsPerPage": 20, "index": "<indexname>", "nbHits": 0, "nbPages": 0, "page": 0, "params": "", "processingTimeMS": 0, "query": ""}]
Live reproduction
This is what I do, but we don't use react-native-web we render in an app code sample
π Expected behavior
Simple network request with hits.
Package version
"expo": "50.0.4", "react-native": "0.73.2", "react": "18.2.0", "algoliasearch": "^4.14.3", "react-instantsearch-core": "^7.3.0",`
Operating system
IOS
Browser
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Are the credentials correct? Could you make a reproducible example of this, it seems like it might not be related to react native itself, so maybe you can reproduce in regular React InstantSearch? We have a template available for that purpose here. Thanks!
This is what I do, but we don't use react-native-web we render in an app code sample
I found the bug and it doesn't have anything to do with instant search ( I created a fork and updated your expo example, I can make a PR for it if I have time )
The issue is react-native-gesture-handler, if you import it at the top of the project as react navigation recommend for stack navigation this bug will appear. I solved it by change from stack navigation to native stack navigation.