-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Consider v-show instead of v-if for v-wait component #45
Comments
I think more correct way is using v-if when v-wait first mounts, and then using v-show for future updates Another way is to add option for v-wait (something like v-once) to trigger conditional render only once for waiter with specific name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed while I was uisng the
v-wait
component, my component that I was wrapping was being created twice. First on initial load, then again after my call to my API to load the data. Looking over the source and the vuejs docs I saw this:https://vuejs.org/v2/guide/conditional.html#v-if-vs-v-show
Which states that:
"...child components inside the conditional block are properly destroyed and re-created during toggles"
I wonder if it would be better for
v-wait
to usev-show
instead? Or add an option?The text was updated successfully, but these errors were encountered: