Skip to content

Upgrading react 0.10 to 0.11

Breaking0.10.0 → 0.11.2Breaking5Deprecated1New17Changed6Fixed16Other1

BreakingUpgrade verdict

5 breaking changes.

  • Code that called the old method name must switch to the new one.
  • Default props are now computed a single time for the whole component class instead of separately for each instance.
  • Calling a component directly no longer gives you a live component instance; it gives a description of what to render.
  • These validation helpers now check render descriptors rather than live component instances.
Top 4 of 6 that need code or config changes

Adds envify ^2.0.0.

Installs 9 packages in all (was 0).

Breaking5
Renames SyntheticMouseEvent.getEventModifierState to getModifierState.
SyntheticMouseEvent.getEventModifierStategetModifierState
getDefaultProps() is now called once per class and shared across all instances.
getDefaultProps()
Calling MyComponent() now returns a descriptor, not an instance.
MyComponent()
React.isValidComponent and React.PropTypes.component now validate descriptors, not component instances.
React.isValidComponentReact.PropTypes.component
Custom propType validators should return an Error instead of logging directly.
propType
Deprecated1
Deprecates React.createDescriptor as a result of adding React.createElement.
React.createDescriptor