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

Allow individual reducers to track history specific state #26

Open
webmasterkai opened this issue Feb 27, 2016 · 0 comments
Open

Allow individual reducers to track history specific state #26

webmasterkai opened this issue Feb 27, 2016 · 0 comments

Comments

@webmasterkai
Copy link
Member

createHistoryCache and makeHydratable(reducer) are hacks to make a proof of concept work. It should be up to the individual reducer to decide if it needs to reset itself on history changes. Perhaps a higher order reducer function that accepts reducers and gives them state based current the current history key.

state = {
  history: {},
  historySession: {
    xwu39s: {
      filter: {
        // Some filter state specific to the xwu39s history.
      }
    }
  }
}

There would also need to be some selector functions to make it easy to select the state for current history session but that's easy enough. I like this direction much more...

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

No branches or pull requests

1 participant