Cannot update a component from inside the function body of a different component.
- Administrator
- Site Admin
- Posts: 1726
- Joined: Thu Mar 22, 2018 10:19 am
Cannot update a component from inside the function body of a different component.
If your getting this error, Cannot update a component from inside the function body of a different component. in your javascript console then a state update is being triggered by another component. I had this problem and my solution was to move some code from the constructor to the componentDidMount. This degraded my performance slightly, but now works I have a translation system that pulls from an api, but when i was getting the action from redux it triggered an update from the constructor of another component. Thus updating a component that is about to unmount.