Relating to issue #39. This PR colocates slices of redux state under the store directory, organized into individual directories which contain related actionsselectors and reducer files. This allows redux state to be more manageable to edit as each directory contains all related parts for a given piece of state while maintaining separation from UI.
Structure is as follows:
store
-- index.js - contains the entry points for creating a redux store
-- rootReducer.js- imports all reducers and exports the combined reducer for creating the store, allows us to maintain hot reloading of reducers via webpack. Imports must be done manually and added to the combined export
In addition there will be any number of directories for each slice of managed state that will have the following structure:
slice-name
-- actions.js - contains and exports action types, simple actions, and async actions
-- reducer.js - contains one to many reducers but always exports one combined reducer
-- selectors.js- contains and exports selector functions for deriving state
Relating to issue #39. This PR colocates slices of redux state under the
store
directory, organized into individual directories which contain relatedactions
selectors
andreducer
files. This allows redux state to be more manageable to edit as each directory contains all related parts for a given piece of state while maintaining separation from UI.Structure is as follows:
store
--index.js
- contains the entry points for creating a redux store --rootReducer.js
- imports all reducers and exports the combined reducer for creating the store, allows us to maintain hot reloading of reducers via webpack. Imports must be done manually and added to the combined exportIn addition there will be any number of directories for each slice of managed state that will have the following structure:
actions.js
- contains and exports action types, simple actions, and async actions --reducer.js
- contains one to many reducers but always exports one combined reducer --selectors.js
- contains and exports selector functions for deriving state