Lumphammer (Neil de Carteret)
Lumphammer (Neil de Carteret)
Explore posts from servers
SSolidJS
Created by Lumphammer (Neil de Carteret) on 4/29/2025 in #support
I'm sure this is a stupid question...
I have a a situation where I want to take the current state of part of a store, and create a new store based on said state, which won't affect the original store. This is my current attempt:
const [statStore, setStatStore] = createStore(
unwrap(systemStore.stats),
);
const [statStore, setStatStore] = createStore(
unwrap(systemStore.stats),
);
I really thought that the unwrap would detach the data from its parent, but I can see there's still some Symbol(solid-proxy): values going on. Do I need to, like, deeply unwrap the data?
10 replies
SSolidJS
Created by Lumphammer (Neil de Carteret) on 2/13/2025 in #support
eslint (solid/reactivity) warning on nested store
I'm trying to follow the "Advanced" example from https://docs.solidjs.com/concepts/stores and create a nested store:
const [systemStore, setSystemStore] =
createStore<SystemData>(systemData);

const [statsStore, setStatsStore] = createStore(systemStore.stats);
const [systemStore, setSystemStore] =
createStore<SystemData>(systemData);

const [statsStore, setStatsStore] = createStore(systemStore.stats);
But this triggers an eslint warning: "The reactive variable 'systemStore.stats' should be used within JSX, a tracked scope (like createEffect), or inside an event handler function, or else changes will be ignored." I sort of understand what this means, but it's okay, here, right? Also my reactivity seems to be working okay. Is this a false positive or am I doing something wrong?
1 replies
DDeno
Created by Lumphammer (Neil de Carteret) on 8/1/2023 in #help
What's a good way to write tests for a script which does a bunch filesystem wrangling?
As per the title - I have a script which, given a folder, does a bunch of moving and renaming. I'd like to test it, ideally without having to abstract the entire fs away. The last timer I had to do this under Node.js I think I used mock-fs, but that works directly with Node's fs API. What would be a good approach for doing this in Deno?
5 replies