-
Notifications
You must be signed in to change notification settings - Fork 11
State Management
Jeremy Asuncion edited this page Jul 16, 2024
·
1 revision
We store all of our global state in URL parameters via the useSearchParams()
hook in Remix. The benefit of this is it allows us to have global state + permalinks through one API. All query parameter keys are stored in the QueryParams
enum in the app/constants/query.ts
module.
In the future we may refactor our state to be stored in jotai
, a global state management library using the atom pattern. Storing our state in useSearchParams()
has performance implications that are described in https://github.com/chanzuckerberg/cryoet-data-portal/issues/879.