Repository navigation
Commit 741d38f
committed
fix(compiler): do not treat stable identifiers as static in children positions
Children expression containers can hold renderables that must resolve in the
correct render scope. The stable-name optimization is valid for host attributes
(just string coercion, no scope dependency) but not for children: on the server,
a body call renders the tree to HTML immediately, so a renderable like
`{children}` would expand in the caller's scope instead of where it mounts.
Without the optimization, jsxValueChildrenNeedRenderScope correctly returns true
for identifier children, causing directCallReturnKind to emit 'fragment'/'value'
and letting the server take the deferred path that matches the client.1 parent 7483954 commit 741d38f
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20671 | 20671 | | |
20672 | 20672 | | |
20673 | 20673 | | |
20674 | | - | |
| 20674 | + | |
20675 | 20675 | | |
20676 | 20676 | | |
20677 | | - | |
20678 | | - | |
| 20677 | + | |
20679 | 20678 | | |
20680 | 20679 | | |
20681 | 20680 | | |
| |||
0 commit comments