Thursday , March 4 2021

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

Share

About admin

Check Also

Server-Side Only React with Next, Hacker News

You know that feeling you get sometimes that the web is broken?You visit a seemingly simple website with little or no interactivity, yet somehow it sends you 2 MB of JavaScript to digest. You're half way down the article that you're reading and suddenly: client-side rendering kicks in, resets everything. You try to find your…

Leave a Reply

Your email address will not be published. Required fields are marked *