React Core
Breaking Changes
key
andref
moved off props object, now accessible on the element directly- React is now BSD licensed with accompanying Patents grant
- Default prop resolution has moved to Element creation time instead of mount time, making them effectively static
React.__internals
is removed - it was exposed for DevTools which no longer needs access- Composite Component functions can no longer be called directly - they must be wrapped with
React.createFactory
first. This is handled for you when using JSX.
New Features
- Spread operator (
{...}
) introduced to deprecatethis.transferPropsTo
- Added support for more HTML attributes:
acceptCharset
,classID
,manifest
Deprecations
React.renderComponent
-->React.render
React.renderComponentToString
-->React.renderToString
React.renderComponentToStaticMarkup
-->React.renderToStaticMarkup
React.isValidComponent
-->React.isValidElement
React.PropTypes.component
-->React.PropTypes.element
React.PropTypes.renderable
-->React.PropTypes.node
- DEPRECATED
React.isValidClass
- DEPRECATED
instance.transferPropsTo
- DEPRECATED Returning
false
from event handlers to preventDefault - DEPRECATED Convenience Constructor usage as function, instead wrap with
React.createFactory
- DEPRECATED use of
key={null}
to assign implicit keys
Bug Fixes
- Better handling of events and updates in nested results, fixing value restoration in "layered" controlled components
- Correctly treat
event.getModifierState
as case sensitive - Improved normalization of
event.charCode
- Better error stacks when involving autobound methods
- Removed DevTools message when the DevTools are installed
- Correctly detect required language features across browsers
- Fixed support for some HTML attributes:
list
updates correctly nowscrollLeft
,scrollTop
removed, these should not be specified as props
- Improved error messages
React With Addons
New Features
React.addons.batchedUpdates
added to API for hooking into update cycle
Breaking Changes
React.addons.update
usesassign
instead ofcopyProperties
which doeshasOwnProperty
checks. Properties on prototypes will no longer be updated correctly.
Bug Fixes
- Fixed some issues with CSS Transitions
JSX
Breaking Changes
- Enforced convention: lower case tag names are always treated as HTML tags, upper case tag names are always treated as composite components
- JSX no longer transforms to simple function calls
New Features
@jsx React.DOM
no longer required- spread (
{...}
) operator introduced to allow easier use of props
Bug Fixes
- JSXTransformer: Make sourcemaps an option when using APIs directly (eg, for react-rails)