Skip to content

Allow individual reducers to track history specific state #26

Description

@webmasterkai

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions