Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented May 1, 2023

Pull Request Type

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

Description

Add an ability to override arbitrary atoms only for scoped view-tree.
When a scoped overridden atom is accessed from within a scope, the overridden value is returned and the state is kept in the scope, not in the root or scopes in the ancestor. If accessed from outside the scope, the unoverridden value is used and the state is kept in the root.
Scopes can be nested, with the override of the nearest scope among the ancestors taking precedence.

@ra1028 ra1028 marked this pull request as draft May 1, 2023 16:06
@ra1028 ra1028 force-pushed the scoped-override branch from 6a61213 to a36486a Compare May 4, 2023 08:31
@ra1028 ra1028 marked this pull request as ready for review May 4, 2023 08:58
@ra1028 ra1028 merged commit dbc1f96 into main May 4, 2023
@ra1028 ra1028 deleted the scoped-override branch May 4, 2023 10:56
@ra1028 ra1028 mentioned this pull request May 15, 2023
5 tasks
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.

2 participants