Skip to content

Upgrading react 0.3 to 0.5

Breaking0.3.5 → 0.5.2Breaking4Security1New11Changed4Fixed8Other1

BreakingUpgrade verdict

4 breaking changes and a security fix.

  • The deprecated autoBind helper is gone.
  • The function for unmounting a component at a DOM node has a new name.
  • If your JSX uses class instead of className, your components will be visually broken until you rename it.
  • Props are now always turned into strings before being set on DOM elements, which removes extra type checking and some confusing cases.
Top 4 of 5 that need code or config changes
Breaking4
Removes React.autoBind, which was deprecated in v0.4.
React.autoBind
Renames React.unmountAndReleaseReactRootNode to React.unmountComponentAtNode.
React.unmountAndReleaseReactRootNodeReact.unmountComponentAtNode
JSX no longer transforms class to className; using class requires changing it to className.
classclassName
Standardizes prop to DOM attribute conversion, always converting values to strings before inserting into the DOM.
Security1
Fixes a potential XSS vulnerability when using user content as a key.
keyModerate · CVSS 6.5