I guess it comes down to preference, but with teleport you still have to maintain state regarding visibility of modals. Additionally, in Vue 2 you also don't have built-in teleport feature, so you will have to install additional dependency. But the main reason for me - it just feels easier to open dialogs through special function, than to work with teleports. The code feels cleaner too, as I really hate seeing HTML for dialogs in some random places.
I just recently used the teleport feature for the first time and yah it solves all these issues. The only issue I had was the veuter plugin didn't have support for vue3 yet and eslint made a red wall of my code. Easily fixed with this though: dev.to/mikhailkaran/setting-up-esl...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article, got one question though: why not using teleport feature? v3.vuejs.org/guide/teleport.html
I guess it comes down to preference, but with teleport you still have to maintain state regarding visibility of modals. Additionally, in Vue 2 you also don't have built-in teleport feature, so you will have to install additional dependency. But the main reason for me - it just feels easier to open dialogs through special function, than to work with teleports. The code feels cleaner too, as I really hate seeing HTML for dialogs in some random places.
I just recently used the teleport feature for the first time and yah it solves all these issues. The only issue I had was the veuter plugin didn't have support for vue3 yet and eslint made a red wall of my code. Easily fixed with this though: dev.to/mikhailkaran/setting-up-esl...