Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable root state #99

Closed
wants to merge 3 commits into from
Closed

Conversation

fabriziomoscon
Copy link
Contributor

@fabriziomoscon fabriziomoscon commented Jul 21, 2017

This patch allows to use redux-offline with a root immutable state.
These are non breaking changes on top of v2.0.0

  • add config offlineStateLens: with state getter and setter and splitter for offline state vs rest
  • add config persistAutoRehydrate: to inject another autoHydration (eg: redux-persist-immutable)
  • use offlineStateLens in the middleware and the enhancer
  • add the new flow types for the config
  • fix config.persist flow type
  • update the README.md

Some parts are similar to #54, but unlike it this modification injects your dependency through the config.
An auxiliary npm module providing immutable default configs has been published at: https://www.npmjs.com/package/redux-offline-immutable-config

This code has been written together with @Ashmalech

…ods (eg: redux-persist-immutable)

- add config offlineStateLens: with state getter and setter and splitter for offline state vs rest
- add config persistAutoRehydrate: to make it possible to inject another autoHydration (eg: redux-persist-immutable)
- use offlineStateLens in the middleware and the enhancer
- add the new flowtypes for the config
- update the README.md
@wacii
Copy link
Collaborator

wacii commented Nov 6, 2017

Merged by way of the community fork. Thanks again.

@wacii wacii closed this Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants