Prevent re-render <table> element when changing array in store.

is it possible to prevent re-render whole table element when i splice element from array in store? Table has a hundreds of rows where each row is an array item in store. when delete some items from array will re-render whole table. And it takes some time. I need just delete some <tr> element from DOM. Thanks!
3 Replies
foolswisdom
foolswisdom11mo ago
How are you mutating the store? Perhaps you are mutating in a way that "blows away" the entire array, rather than just setting the specific item. If you're using splice, I'm almost sure you're blowing out the array unless you're using produce You can delete a specific item (at index 5, for example) from the store using setStore("arrayInStore", 5, undefined)
sergeistarolat
sergeistarolat11mo ago
Thanks! I tried that setStore("arrayInStore", 5, "undefined"). It still rerun <For> element where i use store and render whole table again.
foolswisdom
foolswisdom11mo ago
Then there's probably a problem somewhere else. It's impossible to say more without seeing the code 🤷. A playground is usually best
Want results from more Discord servers?
Add your server
More Posts
Is <HydrationScript/> required even if I'm not utilizing SolidJS' SSR?In my project, the `Uncaught ReferenceError: _$HY is not defined` is shown when I'm not using `<HydrBuilding with SSR false starts (and doesn't close) listenersIn my app I create a WebsocketServer on Port 3001. If I run `npm run build` with default SSR settingSolidJS: Manually using SSR with v8?Hi, I am working on a project which has a PHP back-end, but which has access to a PHP V8 (https://gHow to save canvas state to backend and load it later?How can I load the state and save it to the backend later?Is this really the most ergonomic way to preserve searchParams with <A>?I've got what I imagine is a pretty common pattern: displaying a list of entities on the left, each How to instruct a component to reset a state it holds?I have a form looking like this (simplified code): ```jsx <Form> <TextField value={store.foo} /> reactiveMap does not work with size/deleteI have noticed that `reactiveMap` does not trigger update on `delete` or when we "subscribe" using `[SPA Routing]: How to not call data function for the protected routesLet's imagine we have the following app ```tsx const App = () => ( <AuthService> <Router> Why is this store still reactive?https://playground.solidjs.com/anonymous/5b3ceb29-ea8d-493d-a2fb-fd464b28ae2b I create a store in aBundling Component SSR Compatible library - sharedConfig is undefinedHello, I'm trying to create a SolidJS Component library which will be imported into an Astro projec