Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

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
@bjankord bjankord modified the milestones: Q4 2017, Q3 2017 Aug 23, 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
Copy link
Contributor Author

bjankord commented Feb 9, 2018

Resolved in #1194

@bjankord bjankord closed this as completed Feb 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants