TorHammare
TorHammare
SSolidJS
Created by TorHammare on 7/18/2023 in #support
How to handle Reactivity for nested objects?
Could I change so that only the value field of the nodes is reactive? I guess that wouldn't work, it would not update the html structure. But cant I then add an useEffect which updates the html, dependent on when the value field changes?
13 replies
SSolidJS
Created by TorHammare on 7/18/2023 in #support
How to handle Reactivity for nested objects?
well that was an easy fix
13 replies
SSolidJS
Created by TorHammare on 7/18/2023 in #support
How to handle Reactivity for nested objects?
Yes, perhaps. The thing was though that I wanted a generic tree, which could also be any type of tree like different kinds of binary trees or even multi-trees. And use solid to represent it in different ways
13 replies
SSolidJS
Created by TorHammare on 7/18/2023 in #support
How to handle Reactivity for nested objects?
13 replies
SSolidJS
Created by TorHammare on 7/18/2023 in #support
How to handle Reactivity for nested objects?
I still have not figured this out, since if i change something deeper than one step in the produce function, it is not recognized and wont update. Please let me know if you know any example or some code I can look at.
13 replies
SSolidJS
Created by TorHammare on 7/17/2023 in #support
Store for binary tree object
Ah I got the first rendering done using show. The issue is to update the rendering when the tree updates.
const WindowTile = (props) => (
<Show when={props.node.left && props.node.right} fallback={
props.node.value
}>
<WindowTile node={props.node.left} />
<WindowTile node={props.node.right} />
</Show>
);
const WindowTile = (props) => (
<Show when={props.node.left && props.node.right} fallback={
props.node.value
}>
<WindowTile node={props.node.left} />
<WindowTile node={props.node.right} />
</Show>
);
6 replies
SSolidJS
Created by TorHammare on 7/17/2023 in #support
Store for binary tree object
Match component..? Do you have a link to some documentation?
6 replies
SSolidJS
Created by TorHammare on 7/17/2023 in #support
Store for binary tree object
Hmm, Also the append function may also alter other elements in the tree, like making the tree balanced. Resulting in the rendered view may look completely different.
6 replies