-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Making a prop visible in a context, then reading that state inside a child (e.g., setContext('', { get exampleProp() { return exampleProp; }) -> getContext('').exampleProp) causes the snippet to be recreated. See repro and how Mounted child gets called every time show changes.
Passing through a store as a prop instead of a $state fixes it which is why its an annoyance and not blocking an upgrade.
Reproduction
Logs
No response
System Info
System:
OS: Linux 6.5 Arch Linux
CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900HX
Memory: 18.23 GB / 31.19 GB
Container: Yes
Shell: 5.2.15 - /bin/bash
Binaries:
Node: 20.9.0 - /usr/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 10.2.1 - /usr/bin/npm
pnpm: 8.10.0 - /usr/bin/pnpm
bun: 1.0.4 - /usr/bin/bun
Browsers:
Chromium: 118.0.5993.117
[Note: Seems this thing doesn't pick up Firefox. Running FF Dev 120.0b4 from AUR]
npmPackages:
svelte: ^5.0.0-next.2 => 5.0.0-next.2Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels