From decfbdf1f5f12bc53dadbbf998be8a12d60fe9e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?=
This is written with JSX in a CommonJS module and precompiled to vanilla JS by running:
-npm start+
This is written with JSX in a CommonJS module and precompiled to vanilla JS by navigating to the example + directory +
cd /path/to/react/examples/example-name+ and running +
npm start+
npm install+
Learn more about React at facebook.github.io/react. diff --git a/examples/basic-jsx-external/index.html b/examples/basic-jsx-external/index.html index ec93600601..f95f20f837 100644 --- a/examples/basic-jsx-external/index.html +++ b/examples/basic-jsx-external/index.html @@ -10,12 +10,17 @@
- If you can see this, React is not working right. This is probably because you're viewing
- this on your file system instead of a web server. Try running
+ If you can see this, React is not working right. This is probably because you're viewing
+ this on your file system instead of a web server.
+ Try navigating to the React root
+
+ cd /path/to/react ++ and running
python -m SimpleHTTPServer
- and going to http://localhost:8000/.
+ and going to http://localhost:8000/examples/basic-jsx-external/.
This is written with JSX in a separate file and precompiled to vanilla JS by running:
+ +With Babel lower than 6.0
npm install -g babel cd examples/basic-jsx-precompile/ babel example.js --out-dir=build+ +
With Babel 6.0 or higher
+npm install -g babel-cli +npm install babel-preset-react +cd examples/basic-jsx-precompile/ +babel example.js --presets react --out-dir=build
Learn more about React at facebook.github.io/react.