Fetching Search Results as an Array in React
TLDR Yusuf needed help on getting search results as an array in React. Jason suggested using the typesense-js API to call the search endpoint. The solution worked for Yusuf.
1
Aug 23, 2023 (1 month ago)
Yusuf
08:23 PMI don't want to use the
<Hits/>
component, because I already have my own custom component for rendering the results. I just want the user to be able to edit some filters (stored as state variables), and have that re-fetch the search results from my Typesense cluster, and then pass in those results to the rendering component like so: <RenderingComponent searchResults={searchResults} />
.how can I do this in React?
Jason
08:46 PMAug 24, 2023 (1 month ago)
Yusuf
07:25 PM1
Typesense
Indexed 2776 threads (79% resolved)
Similar Threads
Issue with Typesense Adapter in React Search Box
Nikunj encountered an error with Typesense adapter, and Jason suggested using 'typesense-js' for building their custom UI.
Using Typesense in a React App and Troubleshooting Postman Requests
asada inquired about using `typesense-js` in a React app. Jason confirmed its usage and addressed how to replace pre-built search UI components. Additionally, Jason helped Vasudev with troubleshooting a Postman request format issue.
Implementing Typesense in React without Typesense Instantsearch Adapter
Aravinda is trying to implement typesense in a React project without using Typesense Instantsearch Adapter. Jason suggests using the typesense-js library, referring to the docs for code samples.