aohua / redux-state-sync

A lightweight middleware to sync your redux state across browser tabs
MIT License
234 stars 28 forks source link

Init tab with partial state #108

Open dylancrockett opened 3 years ago

dylancrockett commented 3 years ago

Is there currently a way to initialize the state of a new tab with only a part of the entire state? I saw that this was a feature which was looked at in issue #9, but cannot find where in the documentation it shows how this can be done. If the feature is not yet added what would be a possible workaround, or even would it be possible to add? I would be available to help if needed.

aohua commented 3 years ago

Hi @dylancrockett , It doesn't support it yet. Can't think of any workaround for this now. I think will require some code change in redux-state-sync.

thebetternewt commented 3 years ago

Could this be accomplished with the prepareState option in the config for createStateSyncMiddleware()?

I am currently using this to filter out some state that I don't want transferred to the new browser tab.