Closed mcgodes closed 2 years ago
I don't see anything immediately obvious that's wrong with your code snippet.
But here's one react-instantsearch demo: https://github.com/typesense/showcase-nextjs-typesense-ecommerce-store
Could you try running that locally to see if the issue persists there?
Thanks for the engagement, will try out the demo!
The demo worked for me...so I'll work backwards to see what, if anything, I can figure out. Thanks!
Description
Trying to set up a Typesense server to my website using
react-instantsearch
andtypesense-instantsearch-adapter
. I believe that my<Hits>
component is not being successfully populated, even though I'm getting JSON responses from my server.Steps to reproduce
Here is my search UI code:
I can see that requests are being made to my typesense server via the Chrome debugger tool:
Example Response from Typesense server to Chrome, seems like this is valid to me:
Expected Behavior
I'd expect the
Hits
UX component to receive the typesense server results and to appropriately render thehitComponent
, even if its just a dumb placeholder for now. I hope that is the expected behavior, as all the tutorials and demos don't show any additional connection behavior.Actual Behavior
Unfortunately, my
Hits
component isn't receiving any updates and there is therefore nothing rendering. When I look at the DOM elements, there is just an emptyai-Hits
list. Basically, not sure how to hook up the API responses to the Hits element successfully. I was kinda assuming everything would just work! Please lmk if I'm doing something stupid!Metadata
Typesense Version: typesense-server-0.23.1-1.x86_64.rpm
OS: Amazon Linux v2
Happy to provide any additional info that would be helpful! Please lmk if anyone has any thoughts/suggestions!! Much appreciated!