Hey all, I am implementing a search where on keystroke I need to call an api to get a list of results.
The search is in a header component, and the search results are in a non-nested body component, but both the search and results are both rendered on the same page. I'm wondering what the best Remix-y way of implementing this search would be
1.) On keystroke in the search, update the query params. Then in the results page, listen for the query params and re-run the results page loaders when the query params change
2.) On keystroke in the search, create a form action that returns a redirect to the results page with the query param like http://currentPage?q=search. Run this redirect on every keystroke
Appreciate any insight here!