-
-
Notifications
You must be signed in to change notification settings - Fork 187
Squash #160
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
Squash #160
Conversation
|
This squash approach is very close to the filtering hack, which is why I was hesitant to implement it in this way. It has some unnecessary complexity for the end user. It looks to me like the boolean would need to infer the previous 'squash' state through some form of state stored in the reducer wrapped with undoable. e.g. if I want to squash all |
|
@davidroeca Would it make sense to add a I didn't think in squashing/filtering in stream chunks like the example you just pointed. I agree, the squash and filter actions would become a bit more overwhelmed. I just tried and solved my use case, where I just filter and squash on browser/history pushes, so it creates history entries of the latest (not the initial as before) state before a route transition. |
|
|
|
Also, I feel like the name of the function If you guys decide to keep the functionality, then it should be renamed to |
|
Guys, I know this PR has Let me know if we keep going on preserving this effort. |
|
Agreed, though the added function seems redundant with filtering. If filtering and groupby don't elegantly handle the use case, maybe a config boolean for filtering behavior as you mentioned in #158 might make more sense? |
|
@davidroeca right. we could safely close this PR and I can work on the The spec would simply be:
All good @davidroeca ? |
|
Sounds good to me 👌 |
As promised, the
squashfunction described in #158_latestUnfilteredstate with thepresentstateFiltered&Squashed actionis dispatched:presentNot-Filtered&Squashed actionis dispatched:presentjust before the history insertion.Filtered&Not-Squashed actionis dispatched: same as before.Not-Filtered&Not-Squashed actionis dispatched: same as before.