You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially, Oddx requires many high-frequency changes to the global state. In the current design, context api was used for this purpose, but its use cases are limited to prop-drilling scenarios, and we have to figure out re-rendering issues every time a property in the context changes.
Perhaps it's better to use redux because it's best suited for global store management, with the usage of connect/useSelector/reselect to prevent re-rendering issues.
Conclusions:
High-frequency changes -> Redux FTW
Lower-frequency changes -> Context API + React.memo FTW
E.g: Gameplay will be in Redux store, while theme, language, auth players will be handled by Context API.
The text was updated successfully, but these errors were encountered:
Essentially, Oddx requires many high-frequency changes to the global state. In the current design, context api was used for this purpose, but its use cases are limited to prop-drilling scenarios, and we have to figure out re-rendering issues every time a property in the context changes.
Perhaps it's better to use redux because it's best suited for global store management, with the usage of connect/useSelector/reselect to prevent re-rendering issues.
Conclusions:
E.g: Gameplay will be in Redux store, while theme, language, auth players will be handled by Context API.
The text was updated successfully, but these errors were encountered: