-
-
Notifications
You must be signed in to change notification settings - Fork 109
feat(core) atom.whileWatched (useEffect-like primitive) and createExternalStoreAtom #312
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
Open
justjake
wants to merge
23
commits into
TanStack:main
Choose a base branch
from
justjake:jake--whileWatched
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.
+840
−5
Open
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8976a27
whileWatched
justjake 3028dd8
whileWatchd test
justjake ac60335
import order
justjake 2a265c6
update doc example
justjake 73b1145
type error in (unused) singal.ts
justjake 176c5e3
createExternalStoreAtom
justjake b852cb8
Update docs
justjake 5c00446
fix lint
justjake 284bc0e
add changeset
justjake 4c381bb
update docs/config.json for new exports
justjake 5e144d1
always refetch
justjake 7e47c65
typo
justjake 000d6bf
remove docs pointing to pr branch
justjake 1b5acd1
more doc typo
justjake 6dc28fb
add missing end codefence in doc
justjake 3e00449
revert alien
justjake 8fb68e6
port notion watched algo
justjake 75f85cb
effects spawn w/ _watches=1 so they are alive by default
justjake 51975bf
fix typo of whileWatched name
justjake 7ccd188
re-entrancy tests & fixes
justjake bf08872
Assertion if watched becomes negative
justjake 5b3f7b5
cleanup old approach
justjake 13a32c5
address nit to verify whileWatched effect lifetime in test
justjake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@tanstack/angular-store': minor | ||
| '@tanstack/preact-store': minor | ||
| '@tanstack/react-store': minor | ||
| '@tanstack/solid-store': minor | ||
| '@tanstack/vue-store': minor | ||
| '@tanstack/store': minor | ||
| '@tanstack/svelte-store': minor | ||
| --- | ||
|
|
||
| Added atom.whileWatched(cb), store.whileWatched(cb), createExternalStoreAtom |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.