in React JS by
Q:

Why is a component constructor called only once?

1 Answer

0 votes
by

React's reconciliation algorithm assumes that without any information to the contrary, if a custom component appears in the same place on subsequent renders, it's the same component as before, so reuses the previous instance rather than creating a new one.

Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
asked Feb 17, 2020 in Ansible by MBarbieri
0 votes
asked Jun 23, 2019 in PHP by SakshiSharma
0 votes
asked Mar 3, 2020 in React JS by miceperry
0 votes
asked Jan 17, 2020 in Jenkins by GeorgeBell
0 votes
asked May 20, 2020 in React JS by SakshiSharma
...