-
Hello. I am writing a Typescript function which gets a component state as one of its arguments and returns the same after modifying it. Do we have a special type for Inferno component state or I should just go with |
Beta Was this translation helpful? Give feedback.
Answered by
Havunen
May 26, 2023
Replies: 1 comment
-
Type of the state depends on the component type, its the second generic type parameter of the Component type. Keep in mind that its not a good idea to read component state outside the component context. It sounds like you need some state management implementation if you want to share the state |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
farooqkz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type of the state depends on the component type, its the second generic type parameter of the Component type.
Keep in mind that its not a good idea to read component state outside the component context. It sounds like you need some state management implementation if you want to share the state