mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #5387 from MattijsKneppers/master
updated Basic Example with External JSX instructions
This commit is contained in:
1 parent
79732f04bf
commit
decfbdf1f5
3 files changed
+26
-5
No files matched your search
@@ -17,9 +17,17 @@ babel example.js --out-dir=build</pre>
|
||||
</div>
|
||||
<h4>Example Details</h4>
|
||||
<p>This is written with JSX in a separate file and precompiled to vanilla JS by running:</p>
|
||||
|
||||
<p><i>With Babel lower than 6.0</i></p>
|
||||
<pre>npm install -g babel
|
||||
cd examples/basic-jsx-precompile/
|
||||
babel example.js --out-dir=build</pre>
|
||||
|
||||
<p><i>With Babel 6.0 or higher</i></p>
|
||||
<pre>npm install -g babel-cli
|
||||
npm install babel-preset-react
|
||||
cd examples/basic-jsx-precompile/
|
||||
babel example.js --presets react --out-dir=build</pre>
|
||||
<p>
|
||||
Learn more about React at
|
||||
<a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
|
||||
|
||||
Reference in new issue
Block a user