Upgrade to React 16
See original GitHub issueThis 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
-
ReactDOM.createPortal
- React.Children support for portals (https://github.com/facebook/react/issues/11373)
-
- “Error boundaries”
-
componentDidCatch
-
- React Addons have been discontinued
-
react-addons-test-utils
is nowreact-dom/test-utils
-
perf
doesn’t work with 16 - no replacement yet -
react-addons-css-transition-group
is nowreact-transition-group
, a separate lib
-
- Deprecated now removed
-
createClass
-
- VDOM
- Allow on as a custom attribute for AMP. https://github.com/facebook/react/issues/11153
- Remove VdomElement? – Nope, still needed by
ReactDOM
- Other
- New rules for Keys
- New rules for Refs
-
getDOMNode
should now returnElement | Text
instead of justElement
- Refresh vdom builder prod-mode logic
- Refresh component builder logic
- componentDidUpdate lifecycle no longer receives prevContext param. See https://github.com/facebook/react/issues/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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:18 (10 by maintainers)
Top Results From Across the Web
React v16.0 – React Blog
Although React 16 includes significant internal changes, in terms of upgrading, you can think of this like any other major React release.
Read more >What is the procedure on upgrading React 15.X to React 16.X
I upgraded from React 15.X to 16.X, but there are so many methods are no longer used, that result the application can't work...
Read more >Upgrade your component to React 16 - GitHub
Upgrade Components To React 16. React 16 includes a number of small breaking changes. They only affect uncommon use cases and we don't...
Read more >Upgrading to React 17 - Medium
We finally upgraded our app to React v17 from v16. The v17 was released almost 3 years after the previous major release.
Read more >How to upgrade version 16 to 18 in react existing project
1.Delete previous nodejs & install latest version node.js -18.3.0 · 2.Delete package.lock. · 3.Add manually latest version for react & react-dom ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi all. I’ve setup a patreon page. If you would like to contribute and are able, I’d really appreciate your support. If you know any one else that enjoys this project, my other OSS libraries, or even my programming blog enough to support me and could reach out to them, that would be tremendously helpful too. Thank you! 🙇♂️
Two tasks externalised (#448 #449) but otherwise: done! 🎉