Refactor notifications to redux #6
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor-notifications-to-redux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
As features grow, UI modules have needed to share a fair amount of data between siblings.
React Contextwas used to initially solve this issue and allowed to break up large state into isolated modules.The isolated state modules were used more so for clarity of the file structure and readability of the
Providers, not reusability.The
Providerstructure is now becoming too tangled as each provider is practically used globally, but still has to be nested in a tree structure, causing undesirable design patterns.The tangled mess makes moving code around very delicate and annoying.
These issues are likely to grow as the UX evolves.
Solution
Replace the
React Contexts withRedux Tool Kit.RTKis much simpler to work with than older methods of working withReduxand will more fully embrace then global state management design that is being used.RTKinferred typing also reduces the boilerplate Typescript required for type safety.An ADR to establish a clear philosophy for how state management fits into the architecture needs to be drafted up before the large
Providersare replaced withRTK.Related Todos