@samitouri / QOS-React-2 / commits / 893919f6a7

Fix React links on the website (#10837)

* Fix React links on the website * Fix code editor * Fix code editor, attempt 2

Dan Abramov committed Sep 26, 2017 at 18:20 UTC 893919f6a77386ec972c7693090c35d93c5ade8f
6 files changed +12 -11
docs/_config.yml
+1 -1
@@ -60,7 +60,7 @@ sass:
60 gems:
61 - jekyll-redirect-from
62 - jekyll-paginate
63 -react_version: 15.4.0
63 +react_version: 16.0.0
64 react_hashes:
65 dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK
66 prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu
docs/_js/live_editor.js
+2 -2
@@ -8,7 +8,7 @@ var IS_MOBILE = (
8 || navigator.userAgent.match(/Windows Phone/i)
9 );
10
11 -var CodeMirrorEditor = React.createClass({
11 +var CodeMirrorEditor = createReactClass({
12 propTypes: {
13 lineNumbers: PropTypes.bool,
14 onChange: PropTypes.func,
@@ -74,7 +74,7 @@ var selfCleaningTimeout = {
74 },
75 };
76
77 -var ReactPlayground = React.createClass({
77 +var ReactPlayground = createReactClass({
78 mixins: [selfCleaningTimeout],
79
80 MODES: {JSX: 'JSX', JS: 'JS'}, //keyMirror({JSX: true, JS: true}),
docs/_layouts/default.html
+3 -2
@@ -49,8 +49,9 @@
49 <script src="https://unpkg.com/codemirror@5.15.2/mode/xml/xml.js"></script>
50 <script src="https://unpkg.com/codemirror@5.15.2/mode/jsx/jsx.js"></script>
51 <script src="https://unpkg.com/prop-types/prop-types.min.js"></script>
52 - <script src="https://unpkg.com/react/dist/react.min.js"></script>
53 - <script src="https://unpkg.com/react-dom/dist/react-dom.min.js"></script>
52 + <script src="https://unpkg.com/react/umd/react.production.min.js"></script>
53 + <script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"></script>
54 + <script src="https://unpkg.com/create-react-class/create-react-class.min.js"></script>
55 <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
56 <script src="/react/js/live_editor.js"></script>
57 </head>
docs/contributing/how-to-contribute.md
+1 -1
@@ -116,7 +116,7 @@ First, run `npm run build`. This will produce pre-built bundles in `build` folde
116
117 The easiest way to try your changes is to run `npm run build` and then open `fixtures/packaging/babel-standalone/dev.html`. This file already uses `react.js` from the `build` folder so it will pick up your changes.
118
119 -If you want to try your changes in your existing React project, you may copy `build/dist/react.development.js`, `build/dist/react-dom.development.js`, or any other build products into your app and use them instead of the stable version. If your project uses React from npm, you may delete `react` and `react-dom` in its dependencies and use `npm link` to point them to your local `build` folder:
119 +If you want to try your changes in your existing React project, you may copy `build/umd/react.development.js`, `build/umd/react-dom.development.js`, or any other build products into your app and use them instead of the stable version. If your project uses React from npm, you may delete `react` and `react-dom` in its dependencies and use `npm link` to point them to your local `build` folder:
120
121 ```sh
122 cd your_project
docs/docs/optimizing-performance.md
+3 -3
@@ -42,11 +42,11 @@ Remember that this is only necessary before deploying to production. For normal
42 We offer production-ready versions of React and React DOM as single files:
43
44 ```html
45 -<script src="https://unpkg.com/react@15/dist/react.min.js"></script>
46 -<script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js"></script>
45 +<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
46 +<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
47 ```
48
49 -Remember that only React files ending with `.min.js` are suitable for production.
49 +Remember that only React files ending with `.production.min.js` are suitable for production.
50
51 ### Brunch
52
docs/downloads/single-file-example.html
+2 -2
@@ -3,8 +3,8 @@
3 <head>
4 <meta charset="UTF-8" />
5 <title>Hello World</title>
6 - <script src="https://unpkg.com/react@latest/dist/react.js"></script>
7 - <script src="https://unpkg.com/react-dom@latest/dist/react-dom.js"></script>
6 + <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
7 + <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
8 <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
9 </head>
10 <body>