The Component Life Cycles of ReactJS
by sona3mNovember 4th, 2020 Too Long; Didn't Read
The Component Life Cycles of ReactJS are a cycle of birth, growth, and death. Mounting is the phase of the component lifecycle when the React component mounts on the DOM (i.e., is created and inserted into the DOM) and rendered for the first time on the webpage. Updating is where the states and props of a component are updated followed by some user events such as clicking, pressing a key on a keyboard etc. This is where a component’s state changes and hence, re-rendering takes place. Unmounting is when the component is finally unmounted and destroyed from the DOM.