Skip to content

fix: fix the onMounted hooks #475

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

Merged
merged 2 commits into from
Sep 15, 2020
Merged

fix: fix the onMounted hooks #475

merged 2 commits into from
Sep 15, 2020

Conversation

ajycc20
Copy link
Contributor

@ajycc20 ajycc20 commented Sep 15, 2020

No description provided.

@@ -122,7 +122,7 @@ In this example:
- The count will be logged synchronously on initial run.
- When `count` is mutated, the callback will be called **after** the component has updated.

Note the first run is executed before the component is mounted. So if you wish to access the DOM (or template refs) in a watched effect, do it in the mounted hook:
Note the first run is executed before the component is `mounted`. So if you wish to access the DOM (or template refs) in a watched effect, do it in the `onMounted` hook:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Thank you for the fix! Looks great to me but I would remove the first backticks here:

Suggested change
Note the first run is executed before the component is `mounted`. So if you wish to access the DOM (or template refs) in a watched effect, do it in the `onMounted` hook:
Note the first run is executed before the component is mounted. So if you wish to access the DOM (or template refs) in a watched effect, do it in the `onMounted` hook:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first backticks has removed

@NataliaTepluhina NataliaTepluhina merged commit 5bbf81d into vuejs:master Sep 15, 2020
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