This blog site has been archived. Go toreact.dev/blog to see the recent posts.
Today we’re releasing React v0.11.1 to address a few small issues. Thanks to everybody who has reported them as they’ve begun upgrading.
The first of these is the most major and resulted in a regression with the use ofsetState
insidecomponentWillMount
when using React on the server. ThesesetState
calls are batched into the initial render. A change we made to our batching code resulted in this path hitting DOM specific code when run server-side, in turn throwing an error asdocument
is not defined.
There are several fixes we’re including in v0.11.1 that are focused around the newly supportedevent.getModifierState()
function. We made some adjustments to improve this cross-browser standardization.
The final fix we’re including is to better support a workaround for some IE8 behavior. The edge-case bug we’re fixing was also present in v0.9 and v0.10, so while it wasn’t a short-term regression, we wanted to make sure we support IE8 to the best of our abilities.
We’d also like to call out a couple additional breaking changes that we failed to originally mention in the release notes for v0.11. We updated that blog post and the changelog, so we encourage you to go read about the changes aroundDescriptors andProp Type Validation.
The release is available for download from the CDN:
We’ve also published version0.11.1
of thereact
andreact-tools
packages on npm and thereact
package on bower.
Please try these builds out andfile an issue on GitHub if you see anything awry.
setState
can be called insidecomponentWillMount
in non-DOM environmentsSyntheticMouseEvent.getEventModifierState
correctly renamed togetModifierState
getModifierState
correctly returns aboolean
getModifierState
is now correctly case sensitiveinnerHTML
workaround is now removed, fixing rerendering in certain cases