stereokai
stereokai
SSolidJS
Created by stereokai on 2/19/2025 in #support
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
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
I have received many useful advices so far, and learned a lot. That's very appreciated. As for my original question, is it or is it not possible?
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
Indeed. Basically I came into this discussion with the mindset that if what I'm asking is not possible, I will simply have to move that property somewhere else
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
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
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
Got it, thank you very much. I'll give it a go!
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
Thanks. Where can I read more about the undefined! usage? And does the path format follows any kind of common standard through which I can more about it?
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
Oh, excuse me, I realized just now that right below the picture example there's code examples of more patterns
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
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
SSolidJS
Created by stereokai on 2/19/2025 in #support
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 that
23 replies
SSolidJS
Created by stereokai on 2/19/2025 in #support
Exclude store property from `unwrap` or from being watched
I am using produce, but either way (as far as I could tell from reading the code) the flow begins in setStore then batch then runUpdates then eventually what I described
23 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
@Alex Lohr that's right, I'm even using it somewhere else. Thanks!
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
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
SSolidJS
Created by stereokai on 9/18/2024 in #support
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.
produce((users) => {
const user = users.find((user) => user === currUser);
if (user) {
user.name = userName();
}
}),
produce((users) => {
const user = users.find((user) => user === currUser);
if (user) {
user.name = userName();
}
}),
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
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-inclusive
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
Thanks. That's creative. Possible to wrap a signal with a getter and setter right?
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
@REEEEE you mean each user, right? Yes, each user is a class. How could I get around this limitation?
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
No description
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
And as I explained, when inspecting the store, I do see the updated user name
36 replies
SSolidJS
Created by stereokai on 9/18/2024 in #support
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
SSolidJS
Created by stereokai on 9/18/2024 in #support
Template doesn't react to property change in store of array of objects
I appreciate your help but it's too terse for me to fully grasp your point. Is the fact that they are matching a problem?
36 replies