From 01dfcad59bab59b243e591af845c7ea2c53f7c41 Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Fri, 15 Mar 2019 13:11:11 -0600 Subject: [PATCH 1/2] Change app component declaration from arrow function to regular function --- packages/react-scripts/template-typescript/src/App.tsx | 2 +- packages/react-scripts/template/src/App.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template-typescript/src/App.tsx b/packages/react-scripts/template-typescript/src/App.tsx index 226ee6316a..16e10d538a 100644 --- a/packages/react-scripts/template-typescript/src/App.tsx +++ b/packages/react-scripts/template-typescript/src/App.tsx @@ -2,7 +2,7 @@ import React from 'react'; import logo from './logo.svg'; import './App.css'; -const App: React.FC = () => { +function App(): React.FC { return (
diff --git a/packages/react-scripts/template/src/App.js b/packages/react-scripts/template/src/App.js index 2b85f25b0f..ce9cbd2946 100644 --- a/packages/react-scripts/template/src/App.js +++ b/packages/react-scripts/template/src/App.js @@ -2,7 +2,7 @@ import React from 'react'; import logo from './logo.svg'; import './App.css'; -const App = () => { +function App() { return (
From 435d13b1c0aea7d9033ed278f3b9e165a7f7c94e Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Sun, 17 Mar 2019 11:14:13 -0600 Subject: [PATCH 2/2] Change TypeScript template back to an arrow function --- packages/react-scripts/template-typescript/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/template-typescript/src/App.tsx b/packages/react-scripts/template-typescript/src/App.tsx index 16e10d538a..226ee6316a 100644 --- a/packages/react-scripts/template-typescript/src/App.tsx +++ b/packages/react-scripts/template-typescript/src/App.tsx @@ -2,7 +2,7 @@ import React from 'react'; import logo from './logo.svg'; import './App.css'; -function App(): React.FC { +const App: React.FC = () => { return (