props and createMemo
I'm confused. I thought I understood perfectly Solid, and today I stumbled upon a performance issue that I don't understand.
I've created a very small and silly example to reproduce it.
https://playground.solidjs.com/anonymous/21929a27-2909-461b-87fe-141c7401f23c
I've inlined the items instead of using
What's wrong? How would you optimize this?
I've created a very small and silly example to reproduce it.
https://playground.solidjs.com/anonymous/21929a27-2909-461b-87fe-141c7401f23c
I've inlined the items instead of using
<For> because I wanted to be sure the example is as simple as possible, but basically, imagine that createMemo is expensive, and the number of items is something on the hundreds. What I expect is that when count() changes, only 2 createMemo should re-compute, since the rest will have the same value false. But instead, all of them re-compute all the time.What's wrong? How would you optimize this?
Quickly discover what the solid compiler will generate from your JSX template
