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

update-reducers fix #122

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

Conversation

dimitriy-k
Copy link

fix issue overwriting values with old values from rehydrated state, when reducers are updated.

Not sure if the test is needed, because update action is deleted.

@ernestomancebo
Copy link
Collaborator

lgtm

@btroncone
Copy link
Owner

I'm not close enough to the project at this point to understand all of the impact this change may have. This will require a major version bump to be safe, no? @ernestomancebo @bufke

@dimitriy-k
Copy link
Author

😴😴😴

@fhissink
Copy link

Any news about when/if this PR will be completed?

@bufke
Copy link
Collaborator

bufke commented May 25, 2019

I'm having a tough time producing the bug. Do you have a sample project that demonstrates it? I attempted to reproduce it by logging in to an app. Reload. Manually dispatching (via redux devtools) a login action that would set a new auth token. Then navigating to a lazy loaded route. I see a update action as you mention. I did not see any old state reappear.

I see a couple people have interest in this bug. I don't feel comfortable merging without understanding the problem fully. I don't know the historical reason for checking the UPDATE_ACTION either.

I did try this patch with some of my apps including some with lazy loading and didn't notice any regressions. The unit test is helpful but it's a very controlled test and I'd like to understand how this bug effects a real project.

@CleverCoder
Copy link

I just tested the one-line fix (removing the check for action.type === UPDATE_ACTION), and it fixes the issue in our application. Anxiously awaiting this to be merged in! It actually uncovered a few other bugs in our application that had a strange dependency on the wrongly-rehydrated state!

@bufke
Copy link
Collaborator

bufke commented Jul 24, 2019

@BillyBlaze no one owes you their time. If you'd like to pay a contractor to support your open source software you are welcome to do so. If you think you can maintain the project better you are welcome to ask to join or fork it.

Repository owner deleted a comment from BillyBlaze Jul 24, 2019
@BBlackwo BBlackwo linked an issue Apr 17, 2020 that may be closed by this pull request
@BBlackwo
Copy link
Collaborator

I'm hesitant to merge this in as the UPDATE_ACTION was explicity added to fix a few issues back in #76, so if this is merged it's likely to reintroduce those issues.

For those that need this fix, there is a workaround #120 (comment)

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.

rehydratedState is not recalculated on UPDATE_ACTION
7 participants