File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1- React Es6 Webpack Demo
1+ React Props Demo
22======================
33
4+ Pass value to other component as props.
5+
46```
57npm install
68npm start
79```
810
9- Then visit < http://localhost:8080/webpack-dev-server/ > , you will see ` Hello world ` on the page.
10-
11- If you modify ` public/hello.jsx ` to change the text, you will see the changes are applied to page instantly.
12-
11+ Then visit < http://localhost:8080/webpack-dev-server/ > .
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
33import ReactDOM from 'react-dom' ;
44
55ReactDOM . render (
6- < Hello /> ,
6+ < Hello name = 'Freewind' /> ,
77 document . getElementById ( "content" )
88) ;
99
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React,{Component} from 'react';
33class Hello extends Component {
44 render ( ) {
55 return < div >
6- < h1 > Hello world </ h1 >
6+ < h1 > Hello { this . props . name } </ h1 >
77 </ div > ;
88 }
99}
You can’t perform that action at this time.
0 commit comments