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

Fix bug in README.md #228

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

lcb931023
Copy link
Contributor

Per https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs, "you can only access the ref after the component is mounted". Therefore this.createTour() which uses this.$ref.el should be called in mounted() instead of created()

Per https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs, "you can only access the ref after the component is mounted". Therefore `this.createTour()` which uses `this.$ref.el` should be called in `mounted()` instead of `created()`
@RobbieTheWagner
Copy link
Member

@lcb931023 created actually runs after mounted.

@lcb931023
Copy link
Contributor Author

Um, I don't think that's true. Please see vuejs's lifecycle diagram here:

image

@RobbieTheWagner
Copy link
Member

Apologies, I don't know where I read that. You are correct.

@RobbieTheWagner RobbieTheWagner merged commit ea67eaf into shipshapecode:master May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants