in

React v16.13.0 – React Blog, Hacker News

Today we are releasing React . .0. It contains bugfixes and new deprecation warnings to help prepare for a future major release.

New Warnings

Warnings for some updates during render

A React component should not cause side effects in other components during rendering.

It is supported to call setState during render, but (only for the same component . If you call

Warning: Cannot update a component from inside the function body of a different component.

This warning will help you find application bugs caused by unintentional state changes. In the rare case that you intentionally want to change the state of another component as a result of rendering, you can wrap the (setState) (call into) useEffect .

When dynamically applying a