File tree Expand file tree Collapse file tree 4 files changed +22
-18
lines changed Expand file tree Collapse file tree 4 files changed +22
-18
lines changed Original file line number Diff line number Diff line change 88 "url" : " https://github.com/facebookincubator/create-react-app/issues"
99 },
1010 "scripts" : {
11- "start" : " node scripts/start.js" ,
12- "build" : " node scripts/build.js" ,
11+ "start" : " node scripts/start.js --debug-template " ,
12+ "build" : " node scripts/build.js --debug-template " ,
1313 "create-react-app" : " node global-cli/index.js --scripts-version \" $PWD/`npm pack`\" "
1414 },
1515 "files" : [
Original file line number Diff line number Diff line change 66 < title > React App</ title >
77 </ head >
88 < body >
9+ < div id ="root "> </ div >
910 <!--
1011 This HTML file is a template.
1112 If you open it directly in the browser, you will see an empty page.
Original file line number Diff line number Diff line change 1- import './App.css' ;
2- import React from 'react' ;
1+ import React , { Component } from 'react' ;
32import logo from './logo.svg' ;
3+ import './App.css' ;
44
5- export default function App ( ) {
6- return (
7- < div className = "App" >
8- < div className = "App-header" >
9- < img src = { logo } className = "App-logo" alt = "logo" />
10- < h2 > Welcome to React</ h2 >
5+ class App extends Component {
6+ render ( ) {
7+ return (
8+ < div className = "App" >
9+ < div className = "App-header" >
10+ < img src = { logo } className = "App-logo" alt = "logo" />
11+ < h2 > Welcome to React</ h2 >
12+ </ div >
13+ < p className = "App-intro" >
14+ To get started, edit < code > src/App.js</ code > and save to reload.
15+ </ p >
1116 </ div >
12- < p className = "App-intro" >
13- To get started, edit < code > src/App.js</ code > and save to reload.
14- </ p >
15- </ div >
16- ) ;
17+ ) ;
18+ }
1719}
20+
21+ export default App ;
Original file line number Diff line number Diff line change 1- import './index.css' ;
21import React from 'react' ;
32import { render } from 'react-dom' ;
43import App from './App' ;
4+ import './index.css' ;
55
6- const rootEl = document . createElement ( 'div' ) ;
7- document . body . appendChild ( rootEl ) ;
6+ const rootEl = document . getElementById ( 'root' ) ;
87render ( < App /> , rootEl ) ;
You can’t perform that action at this time.
0 commit comments