Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 upgrade #658

Closed
1 of 4 tasks
bjankord opened this issue Jul 24, 2017 · 7 comments
Closed
1 of 4 tasks

React 16 upgrade #658

bjankord opened this issue Jul 24, 2017 · 7 comments
Assignees
Milestone

Comments

@bjankord
Copy link
Contributor

Issue Description

When react 16 comes out, we'll want to enable compatibility with react 16.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Terra components are compatible with React 16

Current Behavior

N/A

@bjankord bjankord added this to the Q3 2017 milestone Jul 24, 2017
@emilyrohrbough emilyrohrbough added this to Backlog in Terra Jul 31, 2017
@bjankord bjankord modified the milestones: Q4 2017, Q3 2017 Aug 23, 2017
@bjankord bjankord removed this from Backlog in Terra Sep 13, 2017
@emilyrohrbough
Copy link
Contributor

The React Team's progress in releasing v16 facebook/react#10294

@emilyrohrbough
Copy link
Contributor

emilyrohrbough commented Sep 26, 2017

Some POI With React 16:

>JS Environment Requirements

  1. Suggests to include a global polyfill for older browser support

React 16 depends on the collection types Map and Set. If you support older browsers and devices which may not yet provide these natively (eg <IE11), consider including a global polyfill in your bundled application, such as core-js or babel-polyfill.

  1. Uses requestAnimationFrame, even in test enviornments

>Offers Error Handling

>Lifecycle and Scheduling Changes

  1. Calling setState with null no longer triggers an update and calling setState directly in render always causes an update.
  2. Changing ref to a component will detach/change after render

Previously, changing the ref to a component would always detach the ref before that component's render is called. Now, we change the ref later, when applying the changes to the DOM.

  1. componentDidUpdate lifecycle no longer receives prevContext param. (See Pass prevContext param to componentDidUpdate facebook/react#8631)

>Random Side Note

Hydrating a server rendered container now has an explicit API. Use ReactDOM.hydrate instead of ReactDOM.render if you're reviving server rendered HTML. Keep using ReactDOM.render if you're just doing client-side rendering.

@emilyrohrbough
Copy link
Contributor

Here is the initial assessment of upgrading terra-core to React 16 using React v16.0.0-rc:
https://docs.google.com/document/d/1wmJGGm7vE66V4UtAMTkJlzrjfc3TeTc4mjiY09nk13g/edit?usp=sharing

@emilyrohrbough
Copy link
Contributor

emilyrohrbough commented Sep 26, 2017

Third Party Dependencies Requiring React:

Good To Go Dependency Current Specified Version React 16 Supported Version Watch Issue
enzyme ^2.8.2 v^3.x #871
react-intl v^2.3.0 v2.4.0 Need to bump to v2.4.0
react-datepicker v^0.46.0 v^0.61.0 Need to bump to v0.61.0 CLOSED: Hacker0x01/react-datepicker#972
react-redux v^5.0.4 v4.4.7 N/A
focus-trap-react v^3.0.2 v3.0.4 Need to bump to v3.0.4....CLOSED: focus-trap/focus-trap-react#15
react-router v^3.0.5 v3.2.0 Need to bump to v3.2.0
react-transition-group v^2.2.0 v2.2.1 Need to bump to v2.2.1....CLOSED: reactjs/react-transition-group#198
react-animate-height v^0.9.5 v0.10.4 Need to bump to v0.10.4....CLOSED: Stanko/react-animate-height#28

@emilyrohrbough
Copy link
Contributor

This is blocked by #871.

@bjankord bjankord modified the milestones: Q4 2017, Backlog Oct 13, 2017
@emilyrohrbough
Copy link
Contributor

Unblocked by #871. However will need to implement enzyme-adapter-react-16.

@bjankord bjankord added this to In Progress in Terra Jan 18, 2018
@bjankord bjankord moved this from In Progress to Ready for verification in Terra Jan 25, 2018
@ryanthemanuel ryanthemanuel moved this from Ready for verification to In Review in Terra Feb 1, 2018
@bjankord bjankord moved this from In Review to Ready for verification in Terra Feb 7, 2018
@bjankord
Copy link
Contributor Author

bjankord commented Feb 9, 2018

Resolved in #1194

@bjankord bjankord closed this as completed Feb 9, 2018
@bjankord bjankord moved this from Ready for verification to Ready for Release in Terra Feb 12, 2018
@bjankord bjankord removed this from Ready for Release in Terra Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants