Replies: 1 comment 11 replies
-
It looks fine with this playground: https://tsplay.dev/NBr7xN Can you reproduce the problem in the playground? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to create a store where I save state values using dynamic keys in my application. I have a store like this:
The idea is that I can have a dynamic number of checkbox inputs in my application. When I create those Checkbox components I pass a unique ID to them and then I access the state value for it like this:
So
setCheckboxValue
is now the function used to set the state value of 'darkmode'. But when I try to usesetCheckboxValue
I get this Typescript error:What am I doing wrong here? How is
setCheckboxValue
not knowing what the input value is supposed to be?Beta Was this translation helpful? Give feedback.
All reactions