Why not use class to define types and initial state? #2160
-
Is there a reason the docs do not suggest the use of classes to define the state? Here's the suggested way which duplicates the state structure twice, once for defining the types and then for the initial state.
When we could do it all at once using classes which takes care of both in one go?
|
Beta Was this translation helpful? Give feedback.
Answered by
posva
Apr 21, 2023
Replies: 1 comment
-
Classes are not serializable so this breaks when doing SSR. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Classes are not serializable so this breaks when doing SSR.