-
Notifications
You must be signed in to change notification settings - Fork 18
Custom solid universal runtime with no diffing #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rc3
Are you sure you want to change the base?
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? |
No description provided.