f / f/vue-wait

Consider v-show instead of v-if for v-wait component

Open
#45 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

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 use `v-show` instead? Or add an option?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.