# React v16.13.0

DevFeed: [React v16.13.0](<https://devfeed.tech/articles/react-v16-13-0-22339.md>)

Original publisher: [Read original article](<https://reactjs.org/blog/2020/02/26/react-v16.13.0.html>)

Published: 2020-02-26T00:00:00Z

Content type: release

Language: en

Sources: [React](<https://devfeed.tech/sources/react.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [CSS](<https://devfeed.tech/topics/css.md>), [Babel](<https://devfeed.tech/topics/babel.md>)

Tags: [bugfixes](<https://devfeed.tech/tags/bugfixes.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [react](<https://devfeed.tech/tags/react.md>), [release](<https://devfeed.tech/tags/release.md>), [updates](<https://devfeed.tech/tags/updates.md>)

## AI overview

React 16.13.0 is released with bug fixes and new development warnings. The release warns about state updates during another component's render, conflicting CSS shorthand and longhand rules, deprecated string refs, and the legacy React.createFactory helper.

## Source excerpt

This blog site has been archived. Go to react.dev/blog to see the recent posts. Today we are releasing React 16.13.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 setState during a render on a different component, you will now see a warning: 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. Warnings for conflicting style rules When dynamically applying a style that contains longhand and shorthand versions of CSS properties, particular combinations of updates can cause inconsistent styling. For example: <div style={toggle ? { background: 'blue', backgroundColor: 'red' } : { backgroundColor: 'red' } }> ... </div> You might expect this <div> to always have a red background, no matter the value of toggle. However, on alternating the value of toggle between true and false, the background color start as red, then alternates between transparent and blue, as you can see in this demo. React now detects conflicting style rules and logs a warning. To fix the issue, don't mix shorthand and longhand versions of the same CSS property in the style prop. Warnings for some deprecated string refs String Refs is an old legacy API which is discouraged and is going to be deprecated in the future: <Button ref="myRef" /> (Don't confuse String Refs with refs in general, which remain fully supported.) In the future, we will provide an automated script (a "codemod") to migrate away from String Refs. However, some rare cases can't be