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

[Fix]: selectors always cause re-render because of always return a new function #38

Merged
merged 5 commits into from
Apr 23, 2022

Conversation

ShinyLeee
Copy link
Contributor

Description

This PR contains below fixes:

  • selectors always cause re-render because of always return a new function: In extendSelectors#L41 always return a new function builder(state, api.get, api)[key] which cause re-render every time.
  • fix extendSelectors argument typo in README: Also in extendSelectors#L41 , the first arguments is state, but we named it set in README while extendActions is correct.
  • correct equalityFn typing: This is my missing, the equalityFn receive the current key's data structure instead of the whole store structure.

@ShinyLeee ShinyLeee requested a review from zbeyens as a code owner April 23, 2022 13:54
@changeset-bot
Copy link

changeset-bot bot commented Apr 23, 2022

🦋 Changeset detected

Latest commit: 8671fcd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@udecode/zustood Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ShinyLeee
Copy link
Contributor Author

And maybe we should add more test for this library in the future.

Copy link
Member

@zbeyens zbeyens left a comment

Choose a reason for hiding this comment

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

LGTM

@zbeyens zbeyens merged commit ac9096f into udecode:main Apr 23, 2022
@github-actions github-actions bot mentioned this pull request Apr 23, 2022
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.

2 participants