Skip to content
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

Scoped Atoms #107

Merged
merged 7 commits into from
Apr 17, 2024
Merged

Scoped Atoms #107

merged 7 commits into from
Apr 17, 2024

Conversation

ra1028
Copy link
Owner

@ra1028 ra1028 commented Apr 16, 2024

Pull Request Type

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • Chore

Description

Introduces a new feature called Scoped Atoms that is to allow atoms to be scoped in a particular scope instead of always being shared within the app.
A scope can be defined with AtomScope.
The state of an atom with the newly introduced Scoped attribute is scoped to the nearest scope in the ancestor of where it is used.
If the atom needs to be scoped to a particular scope, it can define an arbitrary scopeID to find a matching scope from the ancestor.

Impact on Existing Code

  • Adds a new initializer parameter to AtomScope.

@ra1028 ra1028 force-pushed the feat/scoped-atoms branch from 38aae90 to ae553ae Compare April 16, 2024 15:44
@ra1028 ra1028 force-pushed the feat/scoped-atoms branch from 135743b to 0763ad5 Compare April 17, 2024 10:32
@ra1028 ra1028 marked this pull request as ready for review April 17, 2024 10:37
@ra1028 ra1028 force-pushed the feat/scoped-atoms branch from 1fac398 to 2a11f4f Compare April 17, 2024 11:29
@ra1028 ra1028 force-pushed the feat/scoped-atoms branch from 2a11f4f to 1e7c7c3 Compare April 17, 2024 11:30
@ra1028 ra1028 changed the title Scoped atom Scoped Atoms Apr 17, 2024
@ra1028 ra1028 merged commit 6047664 into main Apr 17, 2024
6 checks passed
@ra1028 ra1028 deleted the feat/scoped-atoms branch April 17, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant