From 0e87a042a885912e178326b80ca8a79dae632e5e Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 26 Sep 2017 18:20:41 +0100 Subject: [PATCH] Fix React links on the website (#10837) * Fix React links on the website * Fix code editor * Fix code editor, attempt 2 --- _config.yml | 2 +- _js/live_editor.js | 4 ++-- _layouts/default.html | 5 +++-- contributing/how-to-contribute.md | 2 +- docs/optimizing-performance.md | 6 +++--- downloads/single-file-example.html | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/_config.yml b/_config.yml index 0b6d13d4..2bc53ec7 100644 --- a/_config.yml +++ b/_config.yml @@ -60,7 +60,7 @@ sass: gems: - jekyll-redirect-from - jekyll-paginate -react_version: 15.4.0 +react_version: 16.0.0 react_hashes: dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu diff --git a/_js/live_editor.js b/_js/live_editor.js index 3a95ac5f..f1d57b31 100644 --- a/_js/live_editor.js +++ b/_js/live_editor.js @@ -8,7 +8,7 @@ var IS_MOBILE = ( || navigator.userAgent.match(/Windows Phone/i) ); -var CodeMirrorEditor = React.createClass({ +var CodeMirrorEditor = createReactClass({ propTypes: { lineNumbers: PropTypes.bool, onChange: PropTypes.func, @@ -74,7 +74,7 @@ var selfCleaningTimeout = { }, }; -var ReactPlayground = React.createClass({ +var ReactPlayground = createReactClass({ mixins: [selfCleaningTimeout], MODES: {JSX: 'JSX', JS: 'JS'}, //keyMirror({JSX: true, JS: true}), diff --git a/_layouts/default.html b/_layouts/default.html index f40bec62..923eceea 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -49,8 +49,9 @@ - - + + + diff --git a/contributing/how-to-contribute.md b/contributing/how-to-contribute.md index 43abca9d..d306f729 100644 --- a/contributing/how-to-contribute.md +++ b/contributing/how-to-contribute.md @@ -116,7 +116,7 @@ First, run `npm run build`. This will produce pre-built bundles in `build` folde 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. -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: +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: ```sh cd your_project diff --git a/docs/optimizing-performance.md b/docs/optimizing-performance.md index 29b1186b..b54aa316 100644 --- a/docs/optimizing-performance.md +++ b/docs/optimizing-performance.md @@ -42,11 +42,11 @@ Remember that this is only necessary before deploying to production. For normal We offer production-ready versions of React and React DOM as single files: ```html - - + + ``` -Remember that only React files ending with `.min.js` are suitable for production. +Remember that only React files ending with `.production.min.js` are suitable for production. ### Brunch diff --git a/downloads/single-file-example.html b/downloads/single-file-example.html index 11b83bf0..d0fe6b2c 100644 --- a/downloads/single-file-example.html +++ b/downloads/single-file-example.html @@ -3,8 +3,8 @@ Hello World - - + +