ndyg
ndyg
SSolidJS
Created by ndyg on 2/15/2024 in #support
understanding store setter updates
I appreciate the advice 💚
9 replies
SSolidJS
Created by ndyg on 2/15/2024 in #support
understanding store setter updates
Just to confirm, would it look like this?
import { batch } from "solid-js";

batch(() => {
setStore("users", 0, "username", "newUsername");
setStore("users", 0, "location", "newLocation");
});
import { batch } from "solid-js";

batch(() => {
setStore("users", 0, "username", "newUsername");
setStore("users", 0, "location", "newLocation");
});
Do you have a sense of which method is generally more preferred within Solid, produce or batch?
9 replies