Adds react-recontext, a package which allows global storage of state. Establishes a global store with actions defined to "dispatch" to that state (similar to setState). call the actions using dispatch("ACTION_NAME", { var: your_var }) in accordance with the action where actionName -> ACTION_NAME. for each class you want to access the global store, change the export to include connect(mapStateToProps)() and then include a mapping const mapStateToProps = state=> ({ var: state.var, });
Testing:
will need to npm install to get the react-recontext package
Steps for manual testing:
Check works as expected.
Checklist:
[x] Latest master merged/rebased into your feature branch
[x] Meets the projects coding conventions
[x] No out of scope changes
[] #Mentioned other relevant issues
[x] No failure when running the application (obviously lol)
Related Issue/Keyword:
Relates to #12
Description:
Adds react-recontext, a package which allows global storage of state. Establishes a global store with actions defined to "dispatch" to that state (similar to setState). call the actions using) and then include a mapping
dispatch("ACTION_NAME", { var: your_var })
in accordance with the action where actionName -> ACTION_NAME. for each class you want to access the global store, change the export to include connect(mapStateToProps)(const mapStateToProps = state=> ({ var: state.var, });
Testing:
will need to
npm install
to get the react-recontext packageSteps for manual testing:
Checklist: