baptiste0928
How to avoid rerenders when using refetch ?
Hi, I'm trying to build a simple todo list app using Solid. Everything has been fine so far, I really enjoy using Solid!
When I decided to add CSS transitions when adding an item to the todo list, I noticed that all items in the list were re-rendered each time they were added. After some investigation, I found that this re-rendering was caused by
refetch
, which when called causes a re-rendering of the entire list. Using mutate
works as expected, so I suspect that the reactivity is lost because the list is replaced with a whole new object.
What's the best way to avoid this kind of re-renders?
8 replies