-
Notifications
You must be signed in to change notification settings - Fork 0
App Stages
Aliaksandr Kavalenka edited this page Feb 20, 2021
·
6 revisions
I use app stages to group visibility modes of the UI.
For example, if I want to hide spinner and show terminal and hide the menu (if menu opened):
dispatch(setAppStage(EAppStages.GAME_IN_PROGRESS));
// instead of
dispatch(hideSpinner());
dispatch(showTerminal());
dispatch(hideMenu());
- app is just open;
- prev game is ended;
- terminal is hidden (but can be shown);
- menu is visible (but can be hidden);
- opponent's field is hidden;
- "PLAY ONLINE" button clicked and no opponent found yet;
- terminal is hidden (but can be shown);
- menu is hidden (but can be shown);
- opponent's field is hidden;
- loading spinner is shown;
- Opponent found;
- "PLAY SINGLE" button clicked;
- terminal is shown (but can be hidden);
- menu is hidden (but can be shown);
- opponent's field is shown;
- loading spinner is hidden;
- All buildings of one of the players were destroyed;
- "QUITE" button clicked;
- terminal is hidden (but can be shown);
- menu is hidden (but can be shown);
- opponent's field is shown (with all marks);
- loading spinner is hidden;