The library for web and native user interfaces.
MIT License
Bot releases are visible (Hide)
Published by gaearon over 6 years ago
React.createRef()
API as an ergonomic alternative to callback refs. (@trueadm in #12162)React.forwardRef()
API to let components forward their refs to a child. (@bvaughn in #12346)React.Fragment
. (@XaveScor in #11823)React.unstable_AsyncComponent
with React.unstable_AsyncMode
. (@acdlite in #12117)setState()
on an unmounted component. (@sophiebits in #12347)getDerivedStateFromProps()
lifecycle and UNSAFE_
aliases for the legacy lifecycles. (@bvaughn in #12028)getSnapshotBeforeUpdate()
lifecycle. (@bvaughn in #12404)<React.StrictMode>
wrapper to help prepare apps for async rendering. (@bvaughn in #12083)onLoad
and onError
events on the <link>
tag. (@roderickhsiao in #11825)noModule
boolean attribute on the <script>
tag. (@aweary in #11900)onKeyPress
in more browsers. (@nstraub in #10514)value
and defaultValue
to ignore Symbol values. (@nhunzaker in #11741)opera
with a null
value. @alisherdavronov in #11854)<option selected>
. (@watadarkstar in #11821)ReactDOM.unstable_createPortal()
in favor of ReactDOM.createPortal()
. (@prometheansacrifice in #11747)React.Component
. (@wyze in #11993)this.state
of different components getting mixed up. (@sophiebits in #12323)toTree()
. (@maciej-ka in #12107 and @gaearon in #12154)null
for components that don't set it. (@jwbay in #11965)contextTypes
. (@koba04 in #11922)ReactIs.isValidElementType()
to help higher-order components validate their inputs. (@jamesreggio in #12483)react-reconciler/persistent
for building renderers that use persistent data structures. (@gaearon in #12156)finalizeInitialChildren()
. (@jquense in #11970)useSyncScheduling
from the host config. (@acdlite in #11771)Published by clemmy almost 7 years ago
Fragment
as named export to React. (@clemmy in #10783)React.Children
utilities. (@MatteoVH in #11422)onChange
event in some cases. (@jquense in #11028)setState()
callback firing too early when called from componentWillMount
. (@accordeiro in #11507)Published by nhunzaker almost 7 years ago
document.documentMode
would trigger IE detection in other browsers, breaking change events. (@aweary in #10032)onChange
would not fire with defaultChecked
on radio inputs. (@jquense in #10156)controlList
attribute to DOM property whitelist (@nhunzaker in #9940)Published by gaearon almost 7 years ago
capture
attribute. (@maxschmeling in #11424)ReactDOMServer
public API. (@travi in #11531)autoFocus={false}
attribute on the server. (@gaearon in #11543)Published by gaearon almost 7 years ago
Starting with 16.1.0, we will no longer be publishing new releases on Bower. You can continue using Bower for old releases, or point your Bower configs to the React UMD builds hosted on unpkg that mirror npm releases and will continue to be updated.
React.Children
utilities. (@MatteoVH in #11378)render
method but doesn't extend a known base class. (@sw-yx in #11168)on
as a custom attribute for AMP. (@nuc in #11153)onMouseEnter
and onMouseLeave
firing on wrong elements. (@gaearon in #11164)null
showing up in a warning instead of the component stack. (@gaearon in #10915)tabIndex
not getting applied to SVG elements. (@gaearon in #11034)dangerouslySetInnerHTML
in IE. (@OriR in #11108)form.reset()
to respect defaultValue
on uncontrolled <select>
. (@aweary in #11057)<textarea>
placeholder not rendering on IE11. (@gaearon in #11177)<dialog>
element. (@gaearon in #11035)componentDidReceiveProps
method. (@iamtommcc in #11479)contentEditable
and children
. (@Ethan-Arrowood in #11208)select
gets null value
. (@Hendeca in #11141)suppressHydrationWarning
attribute for intentional client/server text mismatches. (@sebmarkbage in #11126)autoFocus
attribute into SSR markup. (@gaearon in #11192)setState()
calls in componentWillMount()
in shallow renderer. (@Hypnosphi in #11167)shouldComponentUpdate()
after forceUpdate()
. (@d4rky-pl in #11239 and #11439)forceUpdate()
and React.PureComponent
correctly. (@koba04 in #11440)package.json
dependency. (@gaearon in #11340)package.json
dependency. (@gaearon in #11341)react-art/Circle
, react-art/Rectangle
, and react-art/Wedge
. (@gaearon in #11343)Published by acdlite about 7 years ago
Learn more in the React 16.0 announcement post!
render
. (Docs coming soon!)ReactDOM.createPortal()
. (Docs coming soon!)ReactDOMServer.renderToNodeStream()
and ReactDOMServer.renderToStaticNodeStream()
. (@aickin in #10425, #10044, #10039, #10024, #9264, and others.)ReactDOM.render()
and ReactDOM.unstable_renderIntoContainer()
now return null
if called from inside a lifecycle method.
setState
behavior:
setState
with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.setState
directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState
from render.setState
callback (second argument) now fires immediately after componentDidMount
/ componentDidUpdate
instead of after all components have rendered.<A />
with <B />
, B.componentWillMount
now always happens before A.componentWillUnmount
. Previously, A.componentWillUnmount
could fire first in some cases.ref
to a component would always detach the ref before that component's render is called. Now, we change the ref
later, when applying the changes to the DOM.ReactDOM.unmountComponentAtNode
. See this example.
componentDidUpdate
lifecycle no longer receives prevContext
param. (@bvaughn in #8631)componentDidUpdate()
because DOM refs are not available. This also makes it consistent with componentDidMount()
(which does not get called in previous versions either).unstable_batchedUpdates()
anymore.ReactDOM.unstable_batchedUpdates
now only takes one extra argument after the callback.react/dist/react.js
→ react/umd/react.development.js
react/dist/react.min.js
→ react/umd/react.production.min.js
react-dom/dist/react-dom.js
→ react-dom/umd/react-dom.development.js
react-dom/dist/react-dom.min.js
→ react-dom/umd/react-dom.production.min.js
ReactDOM.hydrate
instead of ReactDOM.render
if you're reviving server rendered HTML. Keep using ReactDOM.render
if you're just doing client-side rendering.react-with-addons.js
build anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them.React.createClass
is now available as create-react-class, React.PropTypes
as prop-types, React.DOM
as react-dom-factories, react-addons-test-utils as react-dom/test-utils, and shallow renderer as react-test-renderer/shallow. See 15.5.0 and 15.6.0 blog posts for instructions on migrating code and automated codemods.Published by flarnie over 7 years ago
console.warn
instead of console.error
. (@flarnie in #9753)React.createClass
. Points users to create-react-class
instead. (@flarnie in #9771)React.DOM
factory helpers. (@nhunzaker in #8356)React.createMixin
helper, which was never used. (@aweary in #8853)style
attribute. (@aweary in #9302)onChange
not firing properly for some inputs. (@jquense in #8575)react
. (@flarnie in #9919)isMounted()
to return true
in componentWillUnmount
. (@mridgway in #9638)react-addons-update
to not depend on native Object.assign
. (@gaearon in #9937)create-react-class
. (@gaearon in #9933)react-linked-input
. (@gaearon in #9766)react-addons-(css-)transition-group
to the new package. (@gaearon in #9937)Published by flarnie over 7 years ago
Published by flarnie over 7 years ago
Note: this release has a critical issue and was deprecated. Please update to 15.5.4 or higher.
Published by flarnie over 7 years ago
Note: this release has a critical issue and was deprecated. Please update to 15.5.4 or higher.
Published by acdlite over 7 years ago
Note: this release has a critical issue and was deprecated. Please update to 15.5.4 or higher.
React.createClass
. Points users to create-react-class instead. (@acdlite in d9a4fa4)React.PropTypes
. Points users to prop-types instead. (@acdlite in 043845c)ReactDOM
together with ReactDOMServer
. (@wacii in #9005)react-dom/test-utils
, which exports the React Test Utils. (@bvaughn)componentWillUnmount
was not called for children. (@gre in #8512)react-test-renderer/shallow
, which exports the shallow renderer. (@bvaughn)peerDependencies
so that addons continue to work indefinitely. (@acdlite and @bvaughn in 8a06cd7 and 67a8db3)React.createClass
and React.PropTypes
(@acdlite in 12a96b9)react-addons-test-utils
is deprecated. Use react-dom/test-utils
and react-test-renderer/shallow
instead. (@bvaughn)getInitialState
when this.state
is set. (@bvaughn in #8594)aria-
attributes. (@jessebeach in #7744)autofocus
rather than autoFocus
. (@hkal in #7694)String.prototype.split
. (@nhunzaker in #7629)batchedUpdates
API now passes the wrapped function's return value through. (@bgnorlov in #7444)Simulate.click()
on a <input disabled onClick={foo} />
then foo
will get called whereas it didn't before. (@nhunzaker in #7642)ReactTestRenderer.create()
now accepts {createNodeMock: element => mock}
as an optional argument so you can mock refs with snapshot testing. (@Aweary in #7649, #8261)playsInline
to supported HTML attributes. (@reaperhulk in #7519)as
to supported HTML attributes. (@kevinslin in #7582)preventDefault()
in Synthetic Events. (@g-palmer in #7411)onSelect
implementation. (@AgtLucas in #7533)document.documentMode
checks to handle Google Tag Manager. (@SchleyB in #7594)document.createEvent
. (@Andarist in #7621)dangerouslySetInnerHTML
and SVG in Internet Explorer. (@zpao in #7618)React.Children.only
. (@spicyj in #7514)<input>
validation warning from browsers when changing type
. (@nhunzaker in #7333)stopPropagation()
in Synthetic Events. (@nhunzaker in #7343)<input>
elements in mobile browsers. (@keyanzhang in #7397)<input type="range">
values not updating when changing min
or max
. (@troydemonbreun in #7486)trackedTouchCount
invariant into a console.error for better reliability. (@yungsters in #7400)React.PureComponent
- a new base class to extend, replacing react-addons-pure-render-mixin
now that mixins don't work with ES2015 classes. (@spicyj in #7195)this.props.children
. (@jimfb in #7001)oneOf
and oneOfType
PropTypes sooner. (@troydemonbreun in #6316)PropTypes.element
warning. (@alexzherdev in #7319)setState
warning. (@keyanzhang in #7326)xmlns
, xmlnsXlink
to supported SVG attributes. (@salzhrani in #6471)referrerPolicy
to supported HTML attributes. (@Aweary in #7274)<input type="range">
initial value being rounded. (@troydemonbreun in #7251)npm install react-test-renderer
. (@spicyj in #6944, #7258, @iamdustan in #7362)unstable_renderSubtreeIntoContainer
so that context properly updates when linked to state. (@gaearon in #7125)value
-less submit and reset inputs removing the browser-default text. (@zpao in #7197)name
attribute being added to inputs when not provided. (@okonet in #7199)