stereokai
Exclude store property from `unwrap` or from being watched
Got it. That's good to understand. I appreciate your input and patience. This is what I understood from reading the code but it's a confirmation I hadn't missed a higher level interface or abstraction. Thank you.
23 replies
Exclude store property from `unwrap` or from being watched
Thanks, it finally clicked, and I can see how it can be used to solve my issue. Back to my original question however, is there any way to tell a SolidJS store to "ignore" some property? Couldn't find anything of the sort by looking at the code
23 replies
Exclude store property from `unwrap` or from being watched
@peerreynders thanks. That's the same page I'm familiar with but I don't find the example clear enough. Either way, correct me if I'm wrong, path syntax doesn't cover adding or removing elements, right?
23 replies
Exclude store property from `unwrap` or from being watched
@peerreynders I don't know how to use the path syntax, I'm not familiar with the concept, found the tutorial very limited, didn't have the time to play with it and ended going with
produce
because it required less adaptation in the existing project. I would greatly appreciate an example or a link 🙂
@bigmistqke I am not unwrapping the store myself, the internal updateArray()
function does that23 replies
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