-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
[Not For Merge] Ideating sync callback mechanism after flushPending #2801
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
db5bd2b
to
0b54ff6
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Preview in LiveCodesLatest commit: bea8590
See documentations for usage instructions. |
0b54ff6
to
9e458ba
Compare
9e458ba
to
902aeec
Compare
902aeec
to
687b1ec
Compare
7d84875
to
93e4fe0
Compare
93e4fe0
to
3c13dd4
Compare
585d208
to
e50b53a
Compare
e50b53a
to
eff1be8
Compare
eff1be8
to
97ce448
Compare
0603d1c
to
46ba702
Compare
810be5f
to
77d0dc1
Compare
822b56a
to
eedf967
Compare
eedf967
to
46d9cc8
Compare
46d9cc8
to
b0c509d
Compare
5942730
to
4d787ed
Compare
4d787ed
to
6d82be4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preliminary task.
src/vanilla/store.ts
Outdated
@@ -513,11 +544,14 @@ const buildStore = (getAtomState: StoreArgs[0]): Store => { | |||
} else { | |||
r = writeAtomState(pending, a, aState, ...args) as R | |||
} | |||
flushPending(pending) | |||
flushPending(pending, !isSync) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2804 Let's focus on it separately. If you can help it, I appreciate it. Otherwise, I'll tackle when I have time.
320e544
to
38d0a16
Compare
38d0a16
to
2d9651c
Compare
…callback mechanism after flushPending
2d9651c
to
bea8590
Compare
Summary
atom.unstable_onInit = (store: Store) => void
store.unstable_onChange = () => void
onChange lifecycle hook
This event triggers for atoms that have been computed and after all atoms have been computed.
Supplemental
Check List
pnpm run prettier
for formatting code and docs