Skip to content

Commit

Permalink
Change app component declaration from arrow function to regular funct…
Browse files Browse the repository at this point in the history
…ion (#6655)

* Change app component declaration from arrow function to regular function

* Change TypeScript template back to an arrow function
  • Loading branch information
iansu committed Mar 19, 2019
1 parent 4734d4e commit b424737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-scripts/template/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import logo from './logo.svg';
import './App.css';

const App = () => {

This comment has been minimized.

Copy link
@almasud

almasud Jun 28, 2019

Why use function instead of class?

function App() {
return (
<div className="App">
<header className="App-header">
Expand Down

1 comment on commit b424737

@lucabarigazzi
Copy link

Choose a reason for hiding this comment

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

What's the benefit of passing from an arrow function to a function?

Please sign in to comment.