DEV Community

Discussion on: Read More/Read Less functionality with Vue

Collapse
aarone4 profile image
Aaron Reese

Depends on your use case. If text was behind a paywall or was the answer to a quiz or should be suppressed for screen readers then yes, having it in the DOM would be an issue but most of the time probably not.
But that is why you also have v-if and v-show. The latter adds or removes visibility: hidden, the former actually adds or removes the DOM element

Thread Thread
laurrvt profile image
Laur.Rvt Author

Never thought about that but thanks. I will consider your advice :)