Skeletor
Skeletor

Reputation: 3403

Would it be okay to wrap (Declarative Rendering) the whole DOM into vue?

I want to control the complete html page with vue, not just a part of it. Would it be appropriate to use the whole page with vue instead of just some parts? Technically it works without any problem but I have no ideas of disadvantages, performance, future problems?

<!DOCTYPE html>
<html lang="en">
    <head> ... </head>
    <body>
        <div id="app">
        // WHOLE HTML PAGE
        </div>
    </body>
</html>

Upvotes: 0

Views: 110

Answers (1)

Sousuke
Sousuke

Reputation: 1293

Yes, it's good idea to have all page as vue component. Then you can split this main component to different components. There is no need to put anything outside your vue app, only if you want some parts to be static in every case, like footer etc. There are no disadvantages or any other problems with this approach, it's common case.

Upvotes: 1

Related Questions