Issue:
Currently, many components directly set global state. This makes the component code look messy and harder to maintain.
Proposed Solution:
We can create custom hooks that encapsulate the logic for updating global state. Each hook should be named according to the part of the global state it manages (e.g., useSetGameState). This centralizes the state-setting logic, keeps components cleaner, and makes the codebase easier to maintain.
Feature:
Implement game state management after server emitting of updating this state.
Issue:
Currently, many components directly set global state. This makes the component code look messy and harder to maintain.
Proposed Solution:
We can create custom hooks that encapsulate the logic for updating global state. Each hook should be named according to the part of the global state it manages (e.g., useSetGameState). This centralizes the state-setting logic, keeps components cleaner, and makes the codebase easier to maintain.
Feature:
Implement game state management after server emitting of updating this state.