Skip to content

Upgrade React from 16.13.1 to 17.0.1#4362

Merged
aduth merged 4 commits intomasterfrom
aduth-react-17
Nov 20, 2020
Merged

Upgrade React from 16.13.1 to 17.0.1#4362
aduth merged 4 commits intomasterfrom
aduth-react-17

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Oct 30, 2020

Why: As a developer, I want to...

  • Keep in sync with latest version of dependencies
  • Avoid the effort of writing import React from 'react'; in order to use JSX

Release notes:

More about automatic JSX transform: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

@aduth aduth marked this pull request as draft October 30, 2020 20:02
@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Oct 30, 2020

Looks like TypeScript support for the JSX transform is slated for 4.1.0, currently in beta:

https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#jsx-factories

Updated here, but unsure if we'd want to pin to a beta version, so reverted to draft pull request.

Could either upgrade React independently, or wait for TypeScript 4.1 stable release.

@jmhooper
Copy link
Copy Markdown
Contributor

If I understand correctly, upgrading React w/o TS will break type checking? If that's the case my vote is keep them in sync and wait for 4.1 stable.

@jmhooper
Copy link
Copy Markdown
Contributor

Also, just realized this is 14 days old which makes me think that's the decision we made. My b, must have skipped this PR while catching up after being sick.

@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Nov 13, 2020

The TypeScript types are maintained independently, and it's hard to tell from the history whether it's up-to-date with React 17, but since React 17 was quite uneventful in terms of features, it may very well be the case that there were no API changes to account for in the typings.

TypeScript 4.1.0 is only necessary to take advantage of the automatic JSX transform, which was admittedly a big draw of the upgrade to begin with (in addition to trying to get ahead of a few potential incompatibilities from internal changed behaviors).

I'm failing to recall where I'd seen it, but I'd seen a page which advertised a release date of November 16 for TypeScript 4.1.0, so at this point I think we may as well wait.

@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Nov 20, 2020

TypeScript 4.1.0 was released yesterday. Refreshed the pull request and ready for review.

@aduth aduth marked this pull request as ready for review November 20, 2020 13:39
Copy link
Copy Markdown
Contributor

@jmhooper jmhooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aduth aduth merged commit 440f599 into master Nov 20, 2020
@aduth aduth deleted the aduth-react-17 branch November 20, 2020 14:57
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

Successfully merging this pull request may close these issues.

2 participants