-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Open
dmaskasky
wants to merge
12
commits into
pmndrs:main
Choose a base branch
from
dmaskasky:partial-sync-effect-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+474
−27
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: 8a22c4b
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 21, 2024 08:27
3f07f82
to
4ebc654
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 21:29
a3f9d5f
to
4b35062
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 21:34
4b35062
to
3215a84
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 21:35
3215a84
to
908d767
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 21:43
908d767
to
95e1b4c
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 21:48
95e1b4c
to
3d43b29
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
3 times, most recently
from
December 21, 2024 21:52
4e1c0fd
to
8d13cb8
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 22:22
8d13cb8
to
6bf7d76
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
2 times, most recently
from
December 21, 2024 22:26
ada9115
to
445af4f
Compare
dmaskasky
changed the title
Dec 21, 2024
atom.unstable_onInit
hook to support sync effectsatom.INTERNAL_onInit
hook to support sync effects
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 23:18
445af4f
to
c9475c9
Compare
dmaskasky
force-pushed
the
partial-sync-effect-2
branch
from
December 21, 2024 23:18
c9475c9
to
0f7f7cf
Compare
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