chore: lift "flushSync cannot be called in effects" restriction#17139
chore: lift "flushSync cannot be called in effects" restriction#17139dummdidumm merged 2 commits intomainfrom
Conversation
Since async-await was introduced into the code base a lot has changed. This lifts the restriction. Closes #17131 (though I still wonder why Skeleton does that)
🦋 Changeset detectedLatest commit: 5c32d1b 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 |
|
|
@dummdidumm Skeleton maintainer here, we don't actually call They build framework agnostic state machines with framework adapters, it's quite complicated but maybe this helps understand the use case or even suggest an improvement. Edit upon further inspection it looks like it's to flush all current effects before setting the value of a so called "bindable". Which is an internal reactive variable from the looks of it. @segunadebayo (Creator of Zag) perhaps you could help explain why Zag uses |
|
I'm using ArkUI which is also powered by ZagJS and I'm facing the same problem. Merging this PR will be much appreciated |
Since async-await was introduced into the code base a lot has changed. This proposes to lift the restriction that flushSync cannot be called in effects. No tests fail, and in general the whole logic is a lot more robust now (and, to be fair, the stack traces when debugging are confusing either way).
Closes #17131 (though I still wonder why Skeleton does that)
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 testand lint the project withpnpm lint