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

useUnit returns stale value when used on dynamically changing Event #900

Closed
kireevmp opened this issue May 15, 2023 · 1 comment · Fixed by #901
Closed

useUnit returns stale value when used on dynamically changing Event #900

kireevmp opened this issue May 15, 2023 · 1 comment · Fixed by #901
Labels
bug Something isn't working effector-react effector-react package

Comments

@kireevmp
Copy link
Contributor

kireevmp commented May 15, 2023

What is the current behavior:
When you change the Event provided to useUnit as an argument, the hook returns a stale value.

Please see the reproduction: https://share.effector.dev/jr0mXZYS

What is the expected behavior:
Like useEvent, useUnit should return an up-to-date value with the new callback.

Which versions of effector packages?
master, effector v22.8.5 & effector-react v22.5.1 at the moment of writing

@kireevmp kireevmp added bug Something isn't working needs triage labels May 15, 2023
@zerobias zerobias added effector-react effector-react package and removed needs triage labels May 15, 2023
@zerobias
Copy link
Member

Fixed in effector-react 22.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effector-react effector-react package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants