This allows many different and cool things for web applications. If you turn off JavaScript and load a react application, you might find a single DOM node and a blank page. This is how frameworks like react, vue and angular make web pages with high degrees of interactivity. You can't actually see it, but you can interact with it through JavaScript. What that means is that the virtual dom has all the properties of the regular HTML elements that you usually see on the page, except that the browser has not rendered them. The virtual DOM is like the regular DOM, except that it is held in JavaScript memory. You can think of the DOM as the way that the html is presented to you when you inspect your browser window and go to the elements tab. This sounds more complicated than it is, because at its simplest, you can throw an html file into a server and what will come out are those contents rendered, just like you wrote them. This is an application programming interface (API) that the browser gives you in order to be able to interact with the contents that are rendered on the page. So when you have markup on your page with HTML, your browser compiles all that into a Document Object Model which we abbreviate to the DOM. The DOM is an absolutely integral portion of modern web development, and knowing how to differentiate the three and knowing when to use these is crucial for being an effective web developer. There is confusion out there between these three terms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |