S
SolidJS17mo ago
DanteOz

Subscribe to

Given the derive signal feedback
const [store, setStore] = createStore({fb: [0,1,2]});
const feedback = store.fb;
const [store, setStore] = createStore({fb: [0,1,2]});
const feedback = store.fb;
is there a way obtain which index in the array was modified when the feedback is trigger.
12 Replies
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Razboy20
Razboy2017mo ago
import $TRACK from solid I think seems like all $TRACK is though is just a symbol export const $TRACK = Symbol("solid-track"); So you can also try store.fb[Symbol.for("solid-track")] this wouldn't work, as the original doesn't create a symbol in the global store
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Razboy20
Razboy2017mo ago
does $TRACK get compiled?
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Razboy20
Razboy2017mo ago
then you would have to import it right?
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Razboy20
Razboy2017mo ago
ah ok let me see
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Razboy20
Razboy2017mo ago
ok so then $TRACK as any would be required
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
DanteOz
DanteOz17mo ago
Wow that got deep. This was along the lines of what I was trying. I had state associated with a list that I was trying to trigger logic on. I need to know what changed and how it changed. After looking at the problem for too long I missed that it was easier to put the logic on the setter side. Thanks for the help.