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
The text was updated successfully, but these errors were encountered:
kayrules
changed the title
Error "TypeError r is not a function" occurs when calling hooks with argument
Error "TypeError r is not a function" occurs when calling store with argument
Feb 13, 2020
Hi @kayrules, this is not how Reusable works.
The first parameter to useCounter is a selector function that selects things from the store.
The store can't receive a parameter since it is initialised before you even use it
I'm not sure if this is a known limitation of this library or a bug. I couldn't find any reference on this.
Reproduce
https://codesandbox.io/s/shy-fast-c1v73
Additional Info
Declare store with initialValue:
Calling hooks with initial value as argument:
The text was updated successfully, but these errors were encountered: