Custom solid universal runtime with no diffing#67
Custom solid universal runtime with no diffing#67thetarnav wants to merge 8 commits intolightning-tv:rc3from
Conversation
|
Looking cool. LMK when the TS are fixed up. Also want to put this in the main branch... |
|
Really curious what the intention is 😄 |
|
@elsassph solid's |
|
Maybe there's something related to L3 renderer, because we use Solid universal renderer with L2 and we aren't seeing such issues. |
|
The bug that I'm talking about has nothing to do with lightning renderer. |
95e6144 to
53c608b
Compare
One issue that it introduces currently is with using <view>{(() => {
const children = s.children(() => props.children)
s.createEffect(() => {...})
return children as any
})()}</view>This gets compiled to var el = s.createElement('view')
s.insert(el, () => {
const children = s.children(() => props.children)
s.createEffect(() => {})
return children
})And original solid runtime wraps each function in it's own effect, With my runtime everything happens under a single effect, so every time The simple solution is to use <view>{/*@once*/(() => {
const children = s.children(() => props.children)
s.createEffect(() => {...})
return children as any
})()}</view>Matching solid current behavior in runtime would require wrapping each function in jsx children in a separate memo or effect, just as solid does. |
|
I have never seen code written that way - usually I keep my JSX, JSX (ok with folks using once for those cases). But what about loops? Where there is a loop? |
|
Closing as Solid rendering is pretty quick already. |
No description provided.