File tree Expand file tree Collapse file tree 3 files changed +26
-5
lines changed
Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,16 @@ <h1>Basic CommonJS Example with Browserify</h1>
1818 </ p >
1919 </ div >
2020 < h4 > Example Details</ h4 >
21- < p > This is written with JSX in a CommonJS module and precompiled to vanilla JS by running:</ p >
22- < pre > npm start</ pre >
21+ < p > This is written with JSX in a CommonJS module and precompiled to vanilla JS by navigating to the example
22+ directory
23+ < pre > cd /path/to/react/examples/example-name</ pre >
24+ and running
25+ < pre > npm start</ pre >
26+ < br >
27+ (don't forget to install first)
28+ < pre > npm install</ pre >
29+ < br >
30+ </ p >
2331 < p >
2432 Learn more about React at
2533 < a href ="https://facebook.github.io/react " target ="_blank "> facebook.github.io/react</ a > .
Original file line number Diff line number Diff line change 1010 < h1 > Basic Example with External JSX</ h1 >
1111 < div id ="container ">
1212 < p >
13- If you can see this, React is not working right. This is probably because you're viewing
14- this on your file system instead of a web server. Try running
13+ If you can see this, React is not working right. This is probably because you're viewing
14+ this on your file system instead of a web server.< br >
15+ Try navigating to the React root
16+ < pre >
17+ cd /path/to/react
18+ </ pre >
19+ and running
1520 < pre >
1621 python -m SimpleHTTPServer
1722 </ pre >
18- and going to < a href ="http://localhost:8000/ "> http://localhost:8000/</ a > .
23+ and going to < a href ="http://localhost:8000/examples/basic-jsx-external/ "> http://localhost:8000/examples/basic-jsx-external /</ a > .
1924 </ p >
2025 </ div >
2126 < h4 > Example Details</ h4 >
Original file line number Diff line number Diff line change @@ -17,9 +17,17 @@ <h1>Basic Example with Precompiled JSX</h1>
1717 </ div >
1818 < h4 > Example Details</ h4 >
1919 < p > This is written with JSX in a separate file and precompiled to vanilla JS by running:</ p >
20+
21+ < p > < i > With Babel lower than 6.0</ i > </ p >
2022 < pre > npm install -g babel
2123cd examples/basic-jsx-precompile/
2224babel example.js --out-dir=build</ pre >
25+
26+ < p > < i > With Babel 6.0 or higher</ i > </ p >
27+ < pre > npm install -g babel-cli
28+ npm install babel-preset-react
29+ cd examples/basic-jsx-precompile/
30+ babel example.js --presets react --out-dir=build</ pre >
2331 < p >
2432 Learn more about React at
2533 < a href ="https://facebook.github.io/react " target ="_blank "> facebook.github.io/react</ a > .
You can’t perform that action at this time.
0 commit comments