-
Notifications
You must be signed in to change notification settings - Fork 24
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
Rewriting graph implementation, a signal is made live while getting its value #32
Open
divdavem
wants to merge
4
commits into
proposal-signals:main
Choose a base branch
from
divdavem:getMakesLive
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.
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
This was referenced Sep 12, 2024
divdavem
force-pushed
the
getMakesLive
branch
from
September 13, 2024 08:01
36ffafc
to
028655b
Compare
divdavem
changed the title
Reading a computed makes it live for the duration of get
Reading a signal makes it live for the duration of get
Sep 13, 2024
divdavem
changed the title
Reading a signal makes it live for the duration of get
[WIP] Reading a signal makes it live for the duration of get
Sep 13, 2024
divdavem
force-pushed
the
getMakesLive
branch
5 times, most recently
from
September 18, 2024 13:13
9298ee4
to
b6f5d4f
Compare
divdavem
changed the title
[WIP] Reading a signal makes it live for the duration of get
Rewriting graph implementation, a signal is made live while getting its value
Sep 18, 2024
divdavem
force-pushed
the
getMakesLive
branch
from
September 19, 2024 13:35
b6f5d4f
to
20e9f57
Compare
Thank you for this PR! Apologies for the slowness oft he review. |
@transitive-bullshit, I like the work you've been doing with benchmarking here: #33 any chance you can run those tests on this branch? Thanks!!! |
divdavem
force-pushed
the
getMakesLive
branch
from
November 12, 2024 15:49
bf7f1d3
to
37ddef5
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.
This PR contains a full rewrite of the graph implementation with a bit less code.
I am opening this PR as a possible solution for the following issue I opened: tc39/proposal-signals#227
With this PR, reading a signal outside a reactive context makes it live for the duration of the get. So, calling get on a signal that is not live triggers the
watched
callback and then theunwatched
callback of the signal itself (and all depending signals that were not live).With this PR, it is possible to do this:
And
parsedPreferences$()
will always contain the up-to-date value.This PR also includes the tests and corresponding behavior from #15 and #16.
I have disabled 2 tests that I think are invalid.