This week at the VetsWhoCode cohort, we started learning React. One of our homework assignments? To create this post. A post in which we were tasked with describing our newly-acquired knowledge of this library. So I started where anyone else would: dev.to, where I found a post titled "Explain React.js Like I'm Five". The post can be found here.
Another benefit of using React is the Virtual DOM. React is built for better DOM management, and calculates the necessary changes needed, and refreshes only what is needed. React uses reconciliation to build the web page in virtual memory. Updates are run, and only the necessary changes are rendered in the browser. React uses a diff to check what changes need to be made to the HTML DOM, and then compares the collected diffs to update only the parts of the DOM indicated by those diffs. In this way, the rendering process is faster, because React only has to change or update a small part of what could be a large DOM.
Top comments (0)