svelte
svelte copied to clipboard
`bind:this` weird behavior
Describe the bug
<Container>
<div bind:this={ref}>
<Content {ref} />
</div>
</Container>
When Container
got updated, the div
seems to be a new one, but the ref
points to the old one.
Reproduction
Logs
No response
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
svelte: ^4.2.7 => 4.2.18
Severity
annoyance