-
I have some components whose state are not supposed to be null in their life time. What is the workaround this? |
Beta Was this translation helpful? Give feedback.
Answered by
Havunen
May 27, 2023
Replies: 1 comment 4 replies
-
Do you mean how to add type definition for it? If you mean the actual value you can implement your own base component type and set the state in constructor and extend everything from that type. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
farooqkz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you mean how to add type definition for it?
See:
inferno/packages/inferno/__tests__/hooks.spec.tsx
Line 22 in b300a89
If you mean the actual value you can implement your own base component type and set the state in constructor and extend everything from that type.