Replies: 1 comment 3 replies
-
There is a bug here. I mean there are some mistakes in the code as well but this example helped me find a bug with passing props objects straight to children. A couple things to know. We keep all the conventions from JSX here, as in props get transformed into getter objects or proxies. It looks for functions to do so which is why you ended up having to wrap so deep. The idea is you'd just use
Not really. The problem isn't that it is slow. It's still one of the fastest approaches out there comparable to the fastest VDOM libraries.. only ~15% slower than JSX. But it just can't be optimized in the same way I can with a compiler. More so you are forced into being conscious of the reactive wrapping since I can't just compile it in. The trickiest part is I've been trying to build this tool so that precompiled JSX components play along as well. Basically you get full access to the ecosystem, but the conventions are definitely more awkward. I think I need to make a call whether this is good enough to be core or whether it's more of an experimental side thing. The experience does feel a bit compromised even if functional. |
Beta Was this translation helpful? Give feedback.
-
https://codesandbox.io/s/solidjs-4k0c3?file=/index.html
Hi, I'm still learning this awesome library. This time I'm trying to optimize the rendering myself by using hyper script. Given the code sandbox above. I wonder why I have to wrap my signal in a double arrow function, like this:
devine: () => () => devineBy2()
to make it works.What is the right way to make sure we will only render the part which will be changed?
I found hyper script is cool since it's just normal javascript. But as shown in your documentation, it's the slowest, how can I leverage it and minimize this downside?
Beta Was this translation helpful? Give feedback.
All reactions