forms-frontend
forms-frontend copied to clipboard
Add redux.js to add support for state storage
Description
There will be scenarios where we may want to re-render a page/component but keep track of prior state/entries for better user experience. Redux.js is how we'll be approaching this
Example Scenario
When there's a submission error and the user has to log in again, we don't want them to lose the response they were about to submit.
Considerations
- We should incorporate redux into our current react setup.
- We use typescript, so we should be sure to follow the correct setup, taking inspiration from this
- Make sure our documentation/README is adjusted to include this new dependency and way of approaching the forms app
Hey, i'd like to try and implement this
i closed this by mistake but i'd like to be assigned to this issue if noone else is already working on adding redux :)
Can you create/link issues with the scenarios that you "may" want to implement where this is needed? On it's own this issue doesn't communicate any motivation or reasoning.
On it's own this issue doesn't communicate any motivation or reasoning.
@gitautas the main reasoning is cited, "re-render a page/component but keep track of prior state/entries". We want to keep track of the state of the form when the user closes the page.
The issue does lack a bit the full goal which is to persist (probably in localStorage) the state of all partially completed forms and restore on form open, which will ensure that progress is not lost should a form be open/closed/etc.