PureSoul
PureSoul
SSolidJS
Created by PureSoul on 6/2/2023 in #support
setStore function replace object value
https://playground.solidjs.com/anonymous/f0b1602b-24a8-48db-a37d-e60db6eb3f85
function Counter() {
const [store, setStore] = createStore({
a: { b: { c: 2, d: 3 }, e: { f: { g: 4, h: 5 } } },
});
setStore({ a: { b: { e: 4 } } });
console.log(JSON.stringify(store));

return <div>Test</div>;
}
function Counter() {
const [store, setStore] = createStore({
a: { b: { c: 2, d: 3 }, e: { f: { g: 4, h: 5 } } },
});
setStore({ a: { b: { e: 4 } } });
console.log(JSON.stringify(store));

return <div>Test</div>;
}
In this example setStore is replacing whole store, instead it should merge the store.
12 replies
SSolidJS
Created by PureSoul on 5/9/2023 in #support
CreateStore types not work for array
const [store, setStore] = createStore([{
lotNumber: '',
}]);
const [store, setStore] = createStore([{
lotNumber: '',
}]);
This is giving typescript error in v1.7.5
4 replies
SSolidJS
Created by PureSoul on 4/25/2023 in #support
Cant Change Store with unwrap
when I first unwrap the store and then I set the value its not updated: reproducible example: https://playground.solidjs.com/anonymous/650e10ae-8881-43d4-b1ff-7478e1a1c894
8 replies
SSolidJS
Created by PureSoul on 3/10/2023 in #support
How to add calculated getter in a existing store?
const [store, setStore] = createStore({firstName: "Foo", lastName: "Bar"})
15 replies