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

Import react with star import #292

Merged
merged 2 commits into from
Jun 4, 2020
Merged

Import react with star import #292

merged 2 commits into from
Jun 4, 2020

Conversation

anajavi
Copy link
Collaborator

@anajavi anajavi commented Jun 4, 2020

Apparently the way forward with importing react is by:

import * as React from 'react';

For reference: facebook/react#18102

I find the syntax a little odd, but apparently it makes better webpack builds also:
https://twitter.com/sebmarkbage/status/1250284377138802689

In the future, the import can be dropped altogether, but I guess that at least the peerDependency of react needs to be bumped. Which means major release.

This PR is just to be forward compatible. No breaking changes here.

@anajavi anajavi requested a review from whawker June 4, 2020 06:33
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2020

Codecov Report

Merging #292 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   88.29%   88.29%           
=======================================
  Files          82       82           
  Lines        1051     1051           
  Branches      203      203           
=======================================
  Hits          928      928           
  Misses        107      107           
  Partials       16       16           
Impacted Files Coverage Δ
...highcharts/src/components/Annotation/Annotation.js 88.23% <ø> (ø)
...s/react-jsx-highcharts/src/components/Axis/Axis.js 90.47% <ø> (ø)
...x-highcharts/src/components/BarSeries/BarSeries.js 100.00% <ø> (ø)
...x-highcharts/src/components/BaseChart/BaseChart.js 97.77% <ø> (ø)
...x-highcharts/src/components/ColorAxis/ColorAxis.js 100.00% <ø> (ø)
...react-jsx-highcharts/src/components/Debug/Debug.js 22.22% <ø> (ø)
.../components/Highcharts3dChart/Highcharts3dChart.js 80.00% <ø> (ø)
.../src/components/HighchartsChart/HighchartsChart.js 100.00% <ø> (ø)
...ponents/HighchartsSparkline/HighchartsSparkline.js 42.10% <ø> (ø)
...x-highcharts/src/components/Options3d/Options3d.js 92.00% <ø> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba9fe13...6c726c4. Read the comment docs.

@anajavi anajavi merged commit de5e17c into master Jun 4, 2020
@anajavi anajavi deleted the refactor/react-import branch June 4, 2020 19:30
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.

3 participants