force a dom update when updating a signal before the rest of the onMount function
in this code
csvColumns is dependant on setData, how can I force the render update?
5 Replies
the golden rule is that memos and effects are re-executed and ~nothing else
so if you want something to re-execute when some signal changes make sure to wrap the code in a memo or an effect, and read the signal inside that
so in this case you should probably make
csvColumns a memo
Although setData sounds like the setter for a signal, signal presumably called data, signal called data that presumably you are already depending on. So shouldn't this just work? Maybe the value passed to setData is just the old value for data, but mutated (which is not detected as a change)?why do need blackbox terms like memo? ><
memo as in
createMemo, one of the main functions in SolidSolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
ill just use effect, easier to understand
thx