Open nickdos opened 2 years ago
Something like this is needed if the "basket" view is displayed via a route, because if the user returns to the search route then any state is lost.
route
search
https://jotai.org handles URL state. Example of localstorage: https://www.robinwieruch.de/local-storage-react/ or dedicated lib https://www.npmjs.com/package/use-local-storage-state.
https://reactjsexample.com/sync-react-props-states-to-url-query-params/
Uses URL params
Something like this is needed if the "basket" view is displayed via a
route
, because if the user returns to thesearch
route then any state is lost.https://jotai.org handles URL state. Example of localstorage: https://www.robinwieruch.de/local-storage-react/ or dedicated lib https://www.npmjs.com/package/use-local-storage-state.