A
A
Andrey Titov2019-06-19 18:08:45
JavaScript
Andrey Titov, 2019-06-19 18:08:45

How to apply Vue, React, ... without changing the html code?

All of them, it seems, provide access to their functionality only after adding attributes, tags and parameters to the html code of the page itself.
Or not always?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Glebov, 2019-06-19
@titov_andrei

they need a root element like

<body>
    <div id='app'></div>
</body>

and they will generate all
the html inside themselves, based on the data in json that came from the server,
there is their own template language, and the finished layout will have to be redone

V
Vladimir Golub, 2019-06-21
@RazerVG

They create a virtual DOM that they already interact with.
If you want to use it without changing the HTML code, then you can use ref on the desired element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question