#community-help

Combining ReactInstant Search Widgets with React Hook Form Version

TLDR Uma asks if they can combine ReactInstant Search widgets with React Hook Form version widgets. Jason suggests asking in the Instantsearch github repo, but suspects they'd need to switch all widgets to the hooks version.

Powered by Struct AI
May 22, 2023 (4 months ago)
Uma
Photo of md5-d19873b43b49bc9f4c3569be01240020
Uma
05:32 PM
We are using ReactInstant search default widgets for filtering and also need some widgets that show as only available in the React Hook Form version of Instant search.
- How can we convert the widgets that are only available on the React Hook Form version? Can they be used interchangeably?

https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-dropdown/js/
-Also, how do we stop the search results from populating in the background while they are checking off filtering criteria? We want it to only show the search results after clicking the show results button at the bottom of our filtering form.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:47 PM
> How can we convert the widgets that are only available on the React Hook Form version? Can they be used interchangeably?
Unfortunately this is not possible:

Source - https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/#:~:text=React%20InstantSearch%20and%20React%20InstantSearch,with%20the%20React%20InstantSearch%20components
Image 1 for &gt; How can we convert the widgets that are only available on the React Hook Form version? Can they be used interchangeably?<br>Unfortunately this is not possible:<br><br>Source - <a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/#:~:text=React%20InstantSearch%20and%20React%20InstantSearch,with%20the%20React%20InstantSearch%20components" target="_blank" rel="nofollow">https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/#:~:text=React%20InstantSearch%20and%20React%20InstantSearch,with%20the%20React%20InstantSearch%20components</a>
05:50
Jason
05:50 PM
> Also, how do we stop the search results from populating in the background while they are checking off filtering criteria? We want it to only show the search results after clicking the show results button at the bottom of our filtering form.
You would have to build a custom widget to do this, similar to what’s described here: https://www.algolia.com/doc/guides/building-search-ui/going-further/improve-performance/react-hooks/#turn-off-search-as-you-type
May 23, 2023 (4 months ago)
Uma
Photo of md5-d19873b43b49bc9f4c3569be01240020
Uma
04:00 AM
If the React Instantsearch and React Hook are not interchangeable:
• What can we do if we need some UI widgets that are currently only provided as being available in the React Hook form version?
• Can we have some widgets that are on React Instantsearch and others with React Hook form and run them together at the same time within one filtering form?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:55 PM
I’d recommend asking these questions in the instantsearch github repo, since it’s a separate project.

But my hunch is that if you want to use widgets from the hooks version of instantsearch, you would have to switch all widgets to the hooks version.
May 25, 2023 (4 months ago)
Uma
Photo of md5-d19873b43b49bc9f4c3569be01240020
Uma
02:03 PM
Thank you.