Skip to content

Conversation

@FrankFMY
Copy link
Contributor

@FrankFMY FrankFMY commented Feb 6, 2026

Summary

Closes #17481

Adds documentation for the derived_references_self runtime error, which previously had no description on the error page.

Covers:

  • What the error means (a $derived reading itself during evaluation)
  • Direct self-reference example
  • Indirect cycle example (two deriveds referencing each other)
  • How to fix it: break the cycle by using $state and updating explicitly

This is a revised version of #17629, with corrected examples and a valid fix suggestion.

Explain direct and indirect self-referencing derived cycles,
with examples and guidance on breaking the cycle using $state.

Closes sveltejs#17481
@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: a845041

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

@FrankFMY FrankFMY requested a deployment to Publish pkg.pr.new (external contributors) February 6, 2026 16:53 — with GitHub Actions Waiting
@svelte-docs-bot
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

derived_references_self runtime error is not documented

1 participant