Skip to content

Upgrade to React 16 #418

@japgolly

Description

@japgolly

This is going to be non-trivial. Hopefully not a big deal either.

For those salivating and pining in anticipating for this, I hope to get it done this month but no promises (I have a family to support).

Also it will come out in v1.2.0. Before then there'll be a minor release still on React 15.

Edit: Not committing to a timeline but these are the changes:

Changes & Progress

  • New render return types
    • arrays
    • strings
    • numbers
    • portals
    • null (how does sjr handle this? should we bother supporting it anyway?) -- don't support; THIS. IS. SCAALAAA!
    • EmptyVdom (Scala version of above)
    • boolean (to support JS syntax bool && expr - should we support this? it's ≈ null, even when true) -- don't support; THIS. IS. SCAALAAA!
    • Option[_] (Scala version of above)
    • fragments
  • Fragments
  • Portals
  • "Error boundaries"
    • componentDidCatch
  • React Addons have been discontinued
    • react-addons-test-utils is now react-dom/test-utils
    • perf doesn't work with 16 - no replacement yet
    • react-addons-css-transition-group is now react-transition-group, a separate lib
  • Deprecated now removed
    • createClass
  • VDOM
  • Other
    • New rules for Keys
    • New rules for Refs
    • getDOMNode should now return Element | Text instead of just Element
    • Refresh vdom builder prod-mode logic
    • Refresh component builder logic
    • componentDidUpdate lifecycle no longer receives prevContext param. See Pass prevContext param to componentDidUpdate facebook/react#8631 (Don't think sjr is affected)
    • Remember to test module paths with sjs-bundler -- wasted enough time trying to get fragile bundler to even run my tests
    • Depends on requestAnimationFrame (even in test environments). Might need shim: import 'raf/polyfill'

Externalised

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions