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

V3/uniformize imports #183

Merged
merged 1 commit into from
Jul 15, 2020
Merged

V3/uniformize imports #183

merged 1 commit into from
Jul 15, 2020

Conversation

ugogo
Copy link
Contributor

@ugogo ugogo commented Jul 10, 2020

Uniformize imports

-import React from 'react';
+import * as React from 'react';
-import { ... } from '@chakra-ui/core';
+import * as Chakra from '@chakra-ui/core';

@ugogo ugogo requested a review from a team July 10, 2020 16:03
@ugogo ugogo self-assigned this Jul 10, 2020
@vercel
Copy link

vercel bot commented Jul 10, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/heetch-eng/flamingo/55oz5v4z7
✅ Preview: https://flamingo-git-v3-uniformize-imports.heetch-eng.vercel.app

@ugogo ugogo changed the base branch from master to v3/feature-branch July 10, 2020 16:03
import React from 'react';
import * as React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

I read somewhere this yields different results behind the curtain but I haven't learned about it, do you know what the difference is? 🤔

Copy link
Contributor Author

@ugogo ugogo Jul 13, 2020

Choose a reason for hiding this comment

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

IIRC this is the recommended way of importing React

From facebook/react#18102

This is the correct way to import React from an ES module since the ES module will not have a default export. Only named exports.

@ugogo ugogo merged commit 84d61b1 into v3/feature-branch Jul 15, 2020
@ugogo ugogo deleted the v3/uniformize-imports branch July 15, 2020 08:08
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