Skip to content

change default import into named import - #6623

Closed
xiaoxiangmoe wants to merge 1 commit into
react:masterfrom
xiaoxiangmoe:master
Closed

change default import into named import#6623
xiaoxiangmoe wants to merge 1 commit into
react:masterfrom
xiaoxiangmoe:master

Conversation

@xiaoxiangmoe

Copy link
Copy Markdown
Contributor

@xiaoxiangmoe
xiaoxiangmoe marked this pull request as ready for review March 12, 2019 06:36
@xiaoxiangmoexiaoxiangmoe changed the title change default export into named exportchange default import into named importMar 12, 2019
@Timer

Timer commented Mar 12, 2019

Copy link
Copy Markdown
Contributor

import * as React from 'react'; seems to be an accident, all this code should read import React from 'react';.

Thanks for the PR, can you update the other file?

@xiaoxiangmoe

xiaoxiangmoe commented Mar 12, 2019

Copy link
Copy Markdown
ContributorAuthor

@Timer In TypeScript Doc it write:

import*asReactfrom"react";

Should we use named export rather than default export?

Named export seems to be a more accurate way of expressing the export of react.

I'll open another pull request to change named import into default import.

@locklockBot locked and limited conversation to collaborators Mar 17, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@xiaoxiangmoe@Timer@ianschmitz@facebook-github-bot