redux-persist-crosstab | Keep redux browser tab state in sync | State Container library
kandi X-RAY | redux-persist-crosstab Summary
kandi X-RAY | redux-persist-crosstab Summary
Add cross tab syncing to your redux app with 1 line. This tiny module listens to the window for redux-persist storage events. When an event occurs it will dispatch a rehydrate action.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of redux-persist-crosstab
redux-persist-crosstab Key Features
redux-persist-crosstab Examples and Code Snippets
Community Discussions
Trending Discussions on redux-persist-crosstab
QUESTION
Another way to ask would be, if you really only want to start your app up with the data saved in localStorage (rehydrate) and save every redux state change to localStorage (persist) is using redux-persist any better to using your own solution like Dan Abramov explains here ?
I understand redux-persist comes with a lot of other features, and I myself started using it to be able to use redux-persist-crosstab (to be able to deal with changes between apps running in different tabs), but I wonder if it's overkill to use it for the most basic scenario. Especially since it's harder to understand and sometimes does funny stuff, like calling persist/REHYDRATE randomly.
Am I missing anything obvious here? Thanks
...ANSWER
Answered 2019-Apr-19 at 07:34The usage of redux-persist
depends upon the use case of the application.
First, let me highlight some of the main features of redux-persist
Usage of PersistGate which automatically provides a delay in
rendering of the components
until the state getspersisted
along with the usage to show theloading
component.Custom functions to persist based on multiple types such as
persistStore
,persistReducer
andpersistObject
AutoMerging
of theinitialStates
from the different states based onshallow
anddeep
levelsProbably the most important feature of
blacklisting
andwhitelisting
thereducers
Nested Persistence for
shallow
levelpersistence
anddeep
levelpersistence
Persisting with
migrations
to store different versions of theredux-store
.Transforms to support immutable, compression, encrypt, filter, etc.
Considering the application
you build is just for development
purposes, then it would require at most PersistGate
, persistStore
and probably blacklist
and whitelist
of the reducers, which would still be considerable amount of work considering that you are aware what you might need for your application.
Now for the applications that are production
level and are prone to scaling, then it would be requiring at least 5 / 7
features that I have listed above. Without this module you might need to install modules for compression, encryption and much more, find a way to gracefully store different versions of the redux-store
and retrieve
and display
what might fit your requirement, along with the rehydration
of that redux-store
state.
There are many more implications to this, which will be encountered later on. Therefore based on the requirements of the project, I think it would be beneficial to use this package, to manage the redux-store storage
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install redux-persist-crosstab
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page