Guy Bieber
05/21/2020, 9:08 PMExpected (without @Model):
{"public_key":"","user":{"email":"<mailto:me@me.com|me@me.com>","password":"fun"}}
Actual (with @Model):
{"$record":{"user":{"$record":{"me":"<mailto:guy@me.com|guy@me.com>","password":"fun","frameId":1}},"frameId":1},"public_key":""}
Zach Klippenstein (he/him) [MOD]
05/21/2020, 9:39 PM@Model
is getting deprecated. Is your class immutable? Then you should mark it @Immutable
instead.Guy Bieber
05/21/2020, 9:40 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 9:41 PMGuy Bieber
05/21/2020, 9:42 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 9:46 PMMutableState
. If you need to change your json model, just put a new instance into the state.
If you can’t use an immutable value for some reason, then you can make a wrapper that maintains MutableState
properties for every property on your JSON object.@Model
deprecation is landing in the next dev release though.Guy Bieber
05/21/2020, 9:50 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 9:56 PMMutableState
holders in your UI layer. How are your JSON model objects mutated?Guy Bieber
05/21/2020, 10:00 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 10:02 PMGuy Bieber
05/21/2020, 10:03 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 10:03 PMGuy Bieber
05/21/2020, 10:04 PMZach Klippenstein (he/him) [MOD]
05/21/2020, 11:16 PM