Does react server rendering have to use a state container such as redux?

problem description

I recently worked on a homogeneous react project, and my client is relatively simple and does not require a redux data container. Now the isomorphism uses server-side rendering, but the setState method in my client does not seem to work on the server side and will report an error.

Warning: setState(...): Can only update a mounting component. This usually means you called setState() outside componentWillMount() on theserver. This is a no-op.

what methods have you tried

so I guessed that there is no data container such as redux, which can not be used properly.


is not required to introduce redux. Did you put the setState into the componentDidMount when the component was initialized? ComponentDidMount is not executed during server rendering, only componentWillMount can, so setState should be put in componentWillMount

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c4d9-2c319.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c4d9-2c319.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?