State: UIState
State is required for the current state of the user interface. This is the representation of the UI in terms of what elements are visible or not. This will require actions to update the current UI state, a state interface describing the structure of the state, a reducer to handle changes to UI state, and selectors to retrieve the current UI state.
Actions should be created with the NgRx createAction
utility function.
Selectors should be created with the NgRx createSelector
utility function.
Reducers should be created with the NgRx createReducer
utility function.
- Note: For AOT compilation purposes, the created reducer must be wrapped in a static function (see below)
Actions:
-
uiChanged
(event)- Parameters:
- panels:
UIPanels
- panels:
- Parameters:
State Interface:
- Should be mapped in app state interface in state/index.ts
- Name:
IUIPanelsState
- Properties:
- panels:
UIPanels
- Optional
- panels:
Reducer:
- Should handle the action defined above
- Should be mapped into reducer map in state/index.ts
- Must be wrapped in an AOT compatible function named for the state (see State: Events)
Selectors:
- listIsVisible: Retrieve
list
flag from state - settingsIsVisible: Retrieve
settings
flag from state - mapIsVisible: Retrieve
map
flag from state
Edited by Martinez, Eric M.