Skip to content

Conversation

anthumchris
Copy link

@anthumchris anthumchris commented Jul 5, 2025

This provides a missing example for destructuring reactive $state objects with $derived. I was unaware this was possible until seeing a related StackOverflow answer. I believe other users will benefit from learning this too.

Test: https://svelte.dev/playground/9f2c5885ac2d4e39a40e69983f7ce8b4?version=5.35.2

Copy link

changeset-bot bot commented Jul 5, 2025

⚠️ No Changeset found

Latest commit: 71a66dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot
Copy link

Copy link
Contributor

github-actions bot commented Jul 5, 2025

Playground

pnpm add https://pkg.pr.new/svelte@16306

@Rich-Harris
Copy link
Member

Thank you but I think it makes more sense to put this information on the $derived page — #16400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants