-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
atom.INTERNAL_onInit
hook to support sync effects
#2801
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
dmaskasky
changed the title
propose: synchronous effects
[Not For Merge]: synchronous effects experiment
Nov 8, 2024
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 02:52
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: a1408ad
See documentations for usage instructions. |
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 02:59
0b54ff6
to
9e458ba
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 03:20
9e458ba
to
902aeec
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 03:23
902aeec
to
687b1ec
Compare
dmaskasky
changed the title
[Not For Merge]: synchronous effects experiment
[WIP]: atom.onAfterFlushPending
Nov 8, 2024
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 21:07
7d84875
to
93e4fe0
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 21:34
93e4fe0
to
3c13dd4
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 23:45
585d208
to
e50b53a
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 23:47
e50b53a
to
eff1be8
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
November 8, 2024 23:50
eff1be8
to
97ce448
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 19:54
8568bcd
to
63ce295
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:20
63ce295
to
367d576
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:26
367d576
to
b11f2a6
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:32
b11f2a6
to
0a3d32b
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:36
0a3d32b
to
7964122
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:43
7964122
to
c48b443
Compare
1 task
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 20:48
c48b443
to
0d2e258
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 21:03
0d2e258
to
f57d740
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 21:04
f57d740
to
f91933a
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 23, 2024 21:06
f91933a
to
beb2e24
Compare
This was referenced Jan 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new atom api,
atom.INTERNAL_onInit = (store: Store, atomState: AtomState) => void
.Fires when the atomState is first created in the store for that atom.
Updates
store.unstable_derive
api to add a new callback param,atomOnInit
. This is the interceptor for theatom.unstable_onInit
api. Since getAtomState is whereatom.unstable_onInit
is called, we must addatomOnInit
to the getAtomState params.atomOnInit
accepts a store arg so that the current store is always passed.Supplemental
Check List
pnpm run prettier
for formatting code and docs