You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's because you create a new atom every time my-awesome-widget runs in the second example, which means that it will always have the value "hello".
To make it convenient to use local atoms like that, Reagent allows you to return a new function from the component, that will be called in the future when the component has changed. Like this:
Works as expected.
However, if I try to create the atom in a function, or in a let, it doesn't work.
In the latter case, it seems that any attempt to change the atom (from within my-awesome-widget) will fail.
The text was updated successfully, but these errors were encountered: