Skip to content

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

Closed
@kireevmp

Description

@kireevmp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeffector-reacteffector-react package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions