Store
Store is a unique centralized JavaScript Object Literal
This tree representation encompass a specific snapshot state of the whole application
Mostly, three kind of data in our state:
- Domain Data: data that the application needs to show, use, or modify
- App State: data that is specific to the application's behavior
- UI State: data that represents how the UI is currently displayed
Store Normalization
Store can be considerer like a database, thus the table are the reducers
=> selection
State needs: SHARI
- Shared => many components or services
- Hydrated => persisted & hydrated from Storage
- Available => re-entering routes
- Retrieved => retrieved through side-effect
- Impacted => State that is impacted from other sources
What doesn't belong state
- Forms
- Non serializable Data
- Ephemeral Data