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

[#237] Allow filtering state properties before save it to history #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GeorgeGkas
Copy link

No description provided.

@munen
Copy link

munen commented Jan 11, 2020

This would be great to have.

I'm using redux-undo in https://github.com/200ok-ch/organice and was thinking of how to do what you did.

Is there something I can do to help with the approval / merge process?

y: 0
},
counter: 0
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note from another user of redux-undo: In this case, it would make sense to just compose this as two reducers and then wrap only one of them with undoable.

Something like:

const baseReducer = combineReducers({
  position: positionReducer,
  count: undoable(countReducer),
})

I understand this is a very simplistic example, but I think it can be extrapolated to any scenario - you can simply put the data you want to be ignored into another slice of state and call it a day. What would be the benefit of filtering like this?

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.

3 participants