The callback function is invoked when setState finished and the component gets rendered. Since setState is asynchronous the callback function is used for any post action.
Note: It is recommended to use lifecycle method rather than this callback function.
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience