stereokai
Template doesn't react to property change in store of array of objects
Got it. Since at the moment the class has only 2 properties that warrant reactivity I'm opting for the direct getter/setter method. But I'll definitely keep this lesson in mind. Thanks!
36 replies
Template doesn't react to property change in store of array of objects
@REEEEE Thank you very much, that's an interesting link. Just been experimenting with
createMutable
, what would be the correct way to locate the current user for updating - assuming there's no id or index? Now they are in fact not matching anymore, as @Alex Lohr expected.
36 replies
Template doesn't react to property change in store of array of objects
I see. That's cool. However this class also has some more complex objects and arrays as props. Is it possible to explicitly exclude them from
createMutable
? Or is it all-inclusive36 replies
Template doesn't react to property change in store of array of objects
@Alex Lohr Thanks, but the actual object is a bigger class. My code example is just a simplification of the pattern. However the essentials are identical 🙂
Below is a screen shot of a debugger on the code. As you can see, the 2 objects are matching in the find callback (you can see
Return value: true
on the right).36 replies
Template doesn't react to property change in store of array of objects
But I am not replacing any objects? I am sorry but I'm not sure I fully understand what you're trying to say. Using both store update methods, inspecting the store object reveals that the name key on the user object indeed updated as expected. However the template does not reflect the change.
36 replies