-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: allow async {@const}
in more places
#16643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: d41d821 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Implemented by reusing the `async_body` function inside `Fragment.js`. Also removes the ability to reference a `{@const ...}` of an implicit child inside a boundary pending/failed snippet: - existing duplication of consts can have unintended side effects, e.g. async consts would unexpectedly called multiple times - what if a const is the reason for the failure of a boundary, but is then referenced in the failed snippet? - what if an async const is referenced in a pending snippet? deadlock - inconsistent with how it behaves for components where this already does not work Implemented via the experimental flag so the behavior change only applies there as this is a breaking change strictly speaking. Also added a compiler error for this. closes #16462
7d97f3f
to
d41d821
Compare
I had the same issue, and this PR fixed it for me. |
As in #16571, the value of See Playground |
@philipplentzen can you open an issue for this? thanks |
Issue Philipp mentioned is fixed via #16672 |
Implemented by reusing the
async_body
function insideFragment.js
. Also removes the ability to reference a{@const ...}
of an implicit child inside a boundary pending/failed snippet:Implemented via / only taking effect with the experimental flag so the behavior change only applies there as this is a breaking change strictly speaking. Also added a compiler error for this.
closes #16462
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint