Replies: 2 comments
-
Yes, except from snapshot requires $modelType / $modelId and submodels are plain objects for fromSnapshot while they have to be actual instances for the constructor. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Btw, the default props should be set either way |
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
-
Question: I've instantiating a model from some attributes fetched from the server. I've switched to using a constructor rather than
fromSnapshot
because I want the defaults props to be set.Is
new Note(serverProps)
practically the same asfromSnapshot<Note>(serverProps)
?Beta Was this translation helpful? Give feedback.
All reactions