Skip to content

Change app component declaration from arrow function to regular function - #6655

Merged
iansu merged 2 commits into
react:masterfrom
iansu:template-fixes
Mar 19, 2019
Merged

Change app component declaration from arrow function to regular function#6655
iansu merged 2 commits into
react:masterfrom
iansu:template-fixes

Conversation

@iansu

Copy link
Copy Markdown
Contributor

Small update to the default templates to keep them consistent with the React docs.

@amshtemp

Copy link
Copy Markdown

@iansu
function App(): React.FC { }
vs.
const App: React.FC = () => {}

aren't those different (return type vs function type)?

@iansu

Copy link
Copy Markdown
ContributorAuthor

@amshtemp Yes they are different. We're probably going to change the TypeScript template back to an arrow function.

@petetntpetetnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@iansu
iansu merged commit b424737 into react:masterMar 19, 2019
@locklockBot locked and limited conversation to collaborators Mar 24, 2019
@iansu
iansu deleted the template-fixes branch October 17, 2019 23:32
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@iansu@amshtemp@petetnt@facebook-github-bot