3 ms·
Virtual dom has nothing to do with hot reload. Ages ago (more than 20 years ago) you could do the same while writing HTML and refreshing the browser. And if you
by tigershark 10y ago
Virtual dom has nothing to do with hot reload.
Ages ago (more than 20 years ago) you could do the same while writing HTML and refreshing the browser.
And if you used WYSIWYG editors it was even mostly unnecessary.
- hacker_9 10y agoRefreshing the page is what you currently have to do with a typical javascript setup, with the main problem being that you lose all your state on the page. For example any form fields you've filled out. With bigger Web apps this can be quite a slow way to develop. WYSIWYG editors are built very specifically to convert to and from from a particular markup to html, they can't process anything outside of that. Clojurescript and React allows me to make changes to part of the DOM and only that part of the page updates, maintaining state on the rest of the page. This is made possible because of React's virtual DOM which can run a diff algorithm and only push through the parts that have changed to the actual DOM.
- danneu 10y agoHot reload means something different than refreshing the page, automatically or manually. If the state of art of your development cycle is refreshing the browser, check out hot reload.