losing reactivity in For component
example repo: https://playground.solidjs.com/anonymous/b106963a-0ea6-4da2-a066-8bbf42bfc1f0
why is
todo.nested.data
not updated when i set the store?Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
19 Replies
if you wrap
todo.nested.data
in a fragment it works
o damn
thanks
that was really breaking my brain
that's quite unexpected behavior!
yeah
you can also do
mm ye
but that's dangerous if ur gonna put it in a component
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
mount everest
If it's a component you dont have to
i wonder if For should just wrap anything in a fragment just in case 🤔
ehh I think it's by design
or if
string | number
then in case there is overhead
o really
what could be the purpose?
sort of implicit untrack?I would think so
I think it expects a function for the reactivity to come into play
but I can't really speak to specifics because I'm not deeply familiar with it myself
It's just how I understand it
a fragment is a function?
wonder where on discord i could ask more about this
okay this might be completely wrong so take it with a grain of salt, but I think all elements are technically functions when they get handled by solid
maybe in docs?
hmmm maybe in #reactivity
a ja lol that makes more sense
ryan seems to be posting some stuff so maybe he'll be able to take a look and explain it
I would also love a better understanding of it
o ye they seem to be having a good discussion over there, gonna post it a bit later not to break their flow 🙂
a function returning an element is a valid element
see JSX.Element type definitions