Persist states right from the extension #276
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the extension is adding
persistState
enhancer, which store every change inlocalStorage
. However, it has issues with:We already have all the data from the store on the extension part, and can easily restore it without
![redux_devtools](https://cloud.githubusercontent.com/assets/7957859/21522403/f1fa68d8-cd0d-11e6-804d-fd777de26009.png)
persistState
enhancer. This PR adds a new button:By toggling the button, the states won't be removed from the monitor on unloading the page and will be restored on reload:
![persit](https://cloud.githubusercontent.com/assets/7957859/21522440/3d73635a-cd0e-11e6-8635-2b66a4a2ed07.gif)
We should show when the button is toggled, which will be addressed in
3.0
when we move to the new UI.