Type inference issue when state defined as non-arrow function #640
Replies: 1 comment
-
I'm not sure of why the type isn't inferred.
Yes, let's use only arrow functions for state in docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The second of these two has a type error. The only difference is the arrow fn for state.
Is this expected? If so would maybe the docs should always use an arrow fn for state? This tripped me up just now. I'd be happy to submit a doc PR.
Beta Was this translation helpful? Give feedback.
All reactions