Thank you all for responding my questions ! I really appreciate the clarification.
So the sum it all up :
React treats the array like a tree inside the <App/>
component,
and the paragraphs are its sub-nodes.
React.memo prevents re-renders unless its props change due to parent re-renders, conditional rendering, or state changes from the child component.
If a child component updates its own state, it will re-render itself, but this does not cause the parent to re-render. As a result, a new virtual DOM tree is created, with the child component as the root of that tree.
Also a few defintions I understood Based on the explanations you all provided:
Re-rendering: This is the process of regenerating the virtual DOM tree after the initial render or following a state change.
Re-mounting: This refers to the actual update of the DOM itself when components are re-initialized.
Again, thank you so much for all the support— I really appreciate it. I know my questions might seem basic, but they truly help me a lot. Thanks again! :)