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

Better autotracking support? #492

Open
andreyfel opened this issue Jun 3, 2020 · 6 comments
Open

Better autotracking support? #492

andreyfel opened this issue Jun 3, 2020 · 6 comments

Comments

@andreyfel
Copy link
Contributor

I see that this addon tries to support autotracking but there is a mixed approach:
@tracked _changes and notifyPropertyChange.
Perhaps we should use TrackedObject from https://github.com/pzuraq/tracked-built-ins in order to properly support autotracking?

@andreyfel
Copy link
Contributor Author

I see lack of autotracking support when I define a getter on a changeset which needs to be invalidated when one of the underlying root state properties changes.

@snewcomer
Copy link
Collaborator

We explicitly reset changes when we know about them, thus allowing us to use plain old @tracked. Is state changing outside of the library's control?

https://github.com/validated-changeset/validated-changeset/blob/1b8265cd9a37ab2bf9e93b021f4dc828e0bd2b39/src/index.ts#L774

@andreyfel
Copy link
Contributor Author

No, it is not outside. Will try to make a test for the issue I'm experiencing.

@andreyfel
Copy link
Contributor Author

#495 illustrates the issue

@snewcomer
Copy link
Collaborator

ref #455

@andreyfel
Copy link
Contributor Author

I think the uniqueness of my use case is validating a derived state vs root state validated in #456.

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

No branches or pull requests

2 participants