Search result in general is temporary in nature.
I don't see much point storing the search result in the store.
Should I use react's setState
to render the search results in this case?
Search result in general is temporary in nature.
I don't see much point storing the search result in the store.
Should I use react's setState
to render the search results in this case?
Depends, one use case for storing the search results in the store is:
Now, if you stored the search query and the search result in the store, you can rerender the search page with the same results without another rountrip to the server and it will look like instant loading to the user.
I would personally store the results in store.search