-
-
Notifications
You must be signed in to change notification settings - Fork 106
feat(runtime): beforeUpdate & update hook #87
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
Conversation
Size ReportBundles
Usages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
I've incorporated a console.log
within the watchEffect
for testing purposes, as shown in the attached image.
However, using MutationObserver
doesn't appear to be an effective approach. It only functions post-update and fails to execute pre-update operations.
In reality, I'm progressing with the development of these Hooks
features through a different strategy that I have conceptualized. You can refer to issues #86 and #82 for more details. Once prepared, I will initiate a PR.
I saw a comment for TODO in renderWatch.ts, and I thought maybe you wanted to implement the update hook in the renderWatch.ts file, so I chose to close this PR. And, like you, I believe that MutationObserver is not a good implementation solution |
Implemented beforeUpdate and Update hooks