问题形容:

解决方案:
How to fix the "cannot update a component while rendering a different component" error in React