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

Partially connected component is not updated in 2.1.0 #49

Open
Reeywhaar opened this issue Sep 29, 2019 · 2 comments
Open

Partially connected component is not updated in 2.1.0 #49

Reeywhaar opened this issue Sep 29, 2019 · 2 comments

Comments

@Reeywhaar
Copy link

Hi! Can't wrap my head around simple issue:
Given we have a component and and its connected counterpart, the latter is not updated when it receives props.

Made reproducible:
https://codesandbox.io/s/sharp-moore-l1gcq

Am I doing something wrong? I've tried all combinations of withRef and pure and still no luck. Also everything works fine in 2.0.3.

Thanks!

kriskuiper added a commit to kriskuiper/frontend-applications that referenced this issue Oct 23, 2019
Was an issue with preact-redux that f*ked up pagination functionality: [issue 1](developit/preact-redux#49)
[issue 2](developit/preact-redux#47) (made me revert)
@kriskuiper
Copy link

Had the same issue 2 days ago (hence the reference of your issue) seems like mapStateToProps is only being called after the first state update (from nothing to something) but not when updating an array, object or string.

I also reverted back to 2.0.3 and now everything works fine...

@michaeljsalo
Copy link

I was bit by this bug. Connected component does not rerender when receiving ownProps. Issue is resolved by downgrading preact-redux to 2.0.3. Thanks to @Reeywhaar for a clear demo of this issue.

Bug was experienced with these package versions:
Preact 8.5.3
Redux 4.0.4
Preact-Redux 2.1.0

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

3 participants