ARGA-Genomes / arga-web

Monorepo for ARGA web components and API wrappers
Mozilla Public License 2.0
1 stars 0 forks source link

Evaluate storing state in URL or localstorage #31

Open nickdos opened 2 years ago

nickdos commented 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.

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.

nickdos commented 2 years ago

https://reactjsexample.com/sync-react-props-states-to-url-query-params/

Uses URL params