From 1f45df9d9a303098b1385cb36f734588e6ed26ca Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 14:08:10 -0700 Subject: [PATCH 01/16] remove old docs framey stuff --- docs/_config.yml | 6 ------ docs/_data/nav_docs_old.yml | 4 ---- docs/_layouts/docs-old.html | 27 --------------------------- 3 files changed, 37 deletions(-) delete mode 100644 docs/_data/nav_docs_old.yml delete mode 100644 docs/_layouts/docs-old.html diff --git a/docs/_config.yml b/docs/_config.yml index c6d1ad3bb0a..d84d29cbd99 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -32,12 +32,6 @@ defaults: values: layout: docs sectionid: docs -- scope: - path: docs-old - type: pages - values: - layout: docs-old - sectionid: docs-old - scope: path: contributing type: pages diff --git a/docs/_data/nav_docs_old.yml b/docs/_data/nav_docs_old.yml deleted file mode 100644 index a9f7028b51a..00000000000 --- a/docs/_data/nav_docs_old.yml +++ /dev/null @@ -1,4 +0,0 @@ -- title: Old Guides - items: - - id: forms - title: Forms diff --git a/docs/_layouts/docs-old.html b/docs/_layouts/docs-old.html deleted file mode 100644 index b8367d49e7b..00000000000 --- a/docs/_layouts/docs-old.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -sectionid: docs-old ---- - -
- {% include nav_docs.html %} - -
- Edit on GitHub -

- {{ page.title }} -

-
{{ page.description }}
- - {{ content }} - -
- {% if page.prev %} - ← Prev - {% endif %} - {% if page.next %} - Next → - {% endif %} -
-
-
From 89978dd540bd764d01a9206bdce9d38a752055a0 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 14:45:42 -0700 Subject: [PATCH 02/16] css tweak, tutorial rename, scrap old stuff --- docs/_includes/nav_docs.html | 38 ------------------------------------ docs/css/react.scss | 4 ++-- docs/tutorial/tutorial.md | 4 ++-- 3 files changed, 4 insertions(+), 42 deletions(-) diff --git a/docs/_includes/nav_docs.html b/docs/_includes/nav_docs.html index d45bd535683..be10a9c5131 100644 --- a/docs/_includes/nav_docs.html +++ b/docs/_includes/nav_docs.html @@ -36,42 +36,4 @@

{{ section.title }}

{% endfor %} - - - {% for section in site.data.nav_docs_old %} - - {% endfor %} - - - - {% for section in site.data.nav_tips %} - - {% endfor %} diff --git a/docs/css/react.scss b/docs/css/react.scss index 495738935cc..08740717367 100644 --- a/docs/css/react.scss +++ b/docs/css/react.scss @@ -369,13 +369,13 @@ h1, h2, h3, h4, h5, h6 { width: 100%; padding-bottom: 40px; } - + ul { list-style: none; margin: 0; } ul ul { - margin: 6px 0 0 20px; + margin: 0 0 6px 20px; } li { line-height: 16px; diff --git a/docs/tutorial/tutorial.md b/docs/tutorial/tutorial.md index 56cdbb9c9b8..3edc8ec6b7d 100644 --- a/docs/tutorial/tutorial.md +++ b/docs/tutorial/tutorial.md @@ -1,6 +1,6 @@ --- id: tutorial -title: "Tutorial: Thinking In React" +title: "Tutorial: Intro To React" layout: tutorial sectionid: tutorial permalink: /tutorial/tutorial.html @@ -193,7 +193,7 @@ handleClick(i) { } ``` -We call `.slice()` to copy the `squares` array instead of mutating the existing array. Jump ahead a [section](/react/tutorial/tutorial.html#why-immutability-is-important) to learn why immutability is important. +We call `.slice()` to copy the `squares` array instead of mutating the existing array. Jump ahead a [section](/react/tutorial/tutorial.html#why-immutability-is-important) to learn why immutability is important. Now you should be able to click in squares to fill them again, but the state is stored in the Board component instead of in each Square, which lets us continue building the game. Note how whenever Board's state changes, the Square components rerender automatically. From 42c18a1913581396746ff7cb192b2e5d7591a1c9 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 14:49:26 -0700 Subject: [PATCH 03/16] fix the tutorial links --- docs/_posts/2014-01-06-community-roundup-14.md | 2 +- docs/index.md | 2 +- docs/tutorial/tutorial.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/_posts/2014-01-06-community-roundup-14.md b/docs/_posts/2014-01-06-community-roundup-14.md index 2c55dea4d36..49d32bdad16 100644 --- a/docs/_posts/2014-01-06-community-roundup-14.md +++ b/docs/_posts/2014-01-06-community-roundup-14.md @@ -28,7 +28,7 @@ React is only one-piece of your web application stack. [Mark Lussier](https://gi ## React Rails Tutorial -[Selem Delul](http://selem.im) bundled the [React Tutorial](/react/docs/tutorial.html) into a rails app. This is a good example on how to get started with a rails project. +[Selem Delul](http://selem.im) bundled the [React Tutorial](/react/tutorial/tutorial.html) into a rails app. This is a good example on how to get started with a rails project. > ``` git clone https://github.com/necrodome/react-rails-tutorial diff --git a/docs/index.md b/docs/index.md index 94aba962388..aef8e639c7c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -82,6 +82,6 @@ id: home
diff --git a/docs/tutorial/tutorial.md b/docs/tutorial/tutorial.md index 3edc8ec6b7d..97e1eaa8eab 100644 --- a/docs/tutorial/tutorial.md +++ b/docs/tutorial/tutorial.md @@ -4,6 +4,7 @@ title: "Tutorial: Intro To React" layout: tutorial sectionid: tutorial permalink: /tutorial/tutorial.html +redirect_from: "/docs/tutorial.html" --- ## What We're Building From da5369a4933aa8cfee8cd6fe79eed47c1d3e7a69 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 14:54:52 -0700 Subject: [PATCH 04/16] broken link --- docs/docs/installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index c735495353a..148ccee483d 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -4,6 +4,7 @@ title: Installation permalink: docs/installation.html redirect_from: "docs/index.html" redirect_from: "downloads.html" +redirect_from: "docs/getting-started.html" next: hello-world.html --- From 54537eadcb0337a689b70eaed58dcb27d8509191 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 15:31:42 -0700 Subject: [PATCH 05/16] a slew of broken links --- docs/docs/components-and-props.md | 2 ++ docs/docs/composition-vs-inheritance.md | 1 + docs/docs/installation.md | 2 ++ docs/docs/jsx-in-depth.md | 2 ++ docs/docs/react-without-es6.md | 2 ++ docs/docs/refs-and-the-dom.md | 2 ++ docs/docs/rendering-elements.md | 1 + docs/docs/state-and-lifecycle.md | 1 + docs/tutorial/tutorial.md | 1 + 9 files changed, 14 insertions(+) diff --git a/docs/docs/components-and-props.md b/docs/docs/components-and-props.md index 775e78c2a25..377933cb893 100644 --- a/docs/docs/components-and-props.md +++ b/docs/docs/components-and-props.md @@ -2,6 +2,8 @@ id: components-and-props title: Components and Props permalink: docs/components-and-props.html +redirect_from: "/docs/reusable-components.html" +redirect_from: "/docs/transferring-props.html" prev: rendering-elements.html next: state-and-lifecycle.html --- diff --git a/docs/docs/composition-vs-inheritance.md b/docs/docs/composition-vs-inheritance.md index 6c247433e42..5190f5a9c69 100644 --- a/docs/docs/composition-vs-inheritance.md +++ b/docs/docs/composition-vs-inheritance.md @@ -2,6 +2,7 @@ id: composition-vs-inheritance title: Composition vs Inheritance permalink: docs/composition-vs-inheritance.html +redirect_from: "/docs/multiple-components.html" prev: lifting-state-up.html next: thinking-in-react.html --- diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 148ccee483d..4d24f6072f4 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -5,6 +5,8 @@ permalink: docs/installation.html redirect_from: "docs/index.html" redirect_from: "downloads.html" redirect_from: "docs/getting-started.html" +redirect_from: "docs/tooling-integration.html" +redirect_from: "/docs/package-management.html" next: hello-world.html --- diff --git a/docs/docs/jsx-in-depth.md b/docs/docs/jsx-in-depth.md index c4422c985df..22c0a85922f 100644 --- a/docs/docs/jsx-in-depth.md +++ b/docs/docs/jsx-in-depth.md @@ -2,6 +2,8 @@ id: jsx-in-depth title: JSX In Depth permalink: docs/jsx-in-depth.html +redirect_from: "/docs/jsx-spread.html" +redirect_from: "/docs/jsx-gotchas.html" --- Fundamentally, JSX just provides syntactic sugar for the `React.createElement(component, props, ...children)` function. The JSX code: diff --git a/docs/docs/react-without-es6.md b/docs/docs/react-without-es6.md index 291ef8fd6ec..4f591ace7e1 100644 --- a/docs/docs/react-without-es6.md +++ b/docs/docs/react-without-es6.md @@ -1,6 +1,8 @@ --- id: react-without-es6 title: React Without ES6 +redirect_from: "/docs/language-tooling.html" +redirect_from: "/docs/environments.html" permalink: docs/react-without-es6.html --- diff --git a/docs/docs/refs-and-the-dom.md b/docs/docs/refs-and-the-dom.md index d31377cfd72..3045d78291e 100644 --- a/docs/docs/refs-and-the-dom.md +++ b/docs/docs/refs-and-the-dom.md @@ -1,6 +1,8 @@ --- id: refs-and-the-dom title: Refs and the DOM +redirect_from: "/docs/working-with-the-browser.html" +redirect_from: "/docs/more-about-refs.html" permalink: docs/refs-and-the-dom.html --- diff --git a/docs/docs/rendering-elements.md b/docs/docs/rendering-elements.md index 40bc242655a..c0e16a6a84d 100644 --- a/docs/docs/rendering-elements.md +++ b/docs/docs/rendering-elements.md @@ -2,6 +2,7 @@ id: rendering-elements title: Rendering Elements permalink: docs/rendering-elements.html +redirect_from: "/docs/displaying-data.html" prev: introducing-jsx.html next: components-and-props.html --- diff --git a/docs/docs/state-and-lifecycle.md b/docs/docs/state-and-lifecycle.md index 1c30be9f0fc..17beb80484f 100644 --- a/docs/docs/state-and-lifecycle.md +++ b/docs/docs/state-and-lifecycle.md @@ -2,6 +2,7 @@ id: state-and-lifecycle title: State and Lifecycle permalink: docs/state-and-lifecycle.html +redirect_from: "/docs/interactivity-and-dynamic-uis.html" prev: components-and-props.html next: handling-events.html --- diff --git a/docs/tutorial/tutorial.md b/docs/tutorial/tutorial.md index 97e1eaa8eab..61950c49697 100644 --- a/docs/tutorial/tutorial.md +++ b/docs/tutorial/tutorial.md @@ -5,6 +5,7 @@ layout: tutorial sectionid: tutorial permalink: /tutorial/tutorial.html redirect_from: "/docs/tutorial.html" +redirect_from: "/docs/why-react.html" --- ## What We're Building From 4eb8a5866c34f92192eefb2e46592b94e191731e Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 15:41:41 -0700 Subject: [PATCH 06/16] all broken links up to the tips --- docs/docs/optimizing-performance.md | 1 + docs/docs/reference-dom-elements.md | 3 +++ docs/docs/reference-react-component.md | 2 ++ docs/docs/reference-react.md | 3 +++ docs/docs/web-components.md | 1 + 5 files changed, 10 insertions(+) diff --git a/docs/docs/optimizing-performance.md b/docs/docs/optimizing-performance.md index c51f4656bb6..70f2027a366 100644 --- a/docs/docs/optimizing-performance.md +++ b/docs/docs/optimizing-performance.md @@ -2,6 +2,7 @@ id: optimizing-performance title: Optimizing Performance permalink: docs/optimizing-performance.html +redirect_from: "/docs/advanced-performance.html" --- Internally, React uses several clever techniques to minimize the number of costly DOM operations required to update the UI. For many applications, using React will lead to a fast user interface without doing much work to specifically optimize for performance. Nevertheless, there are several ways you can speed up your React application. diff --git a/docs/docs/reference-dom-elements.md b/docs/docs/reference-dom-elements.md index cc0059ba666..7f36747f07a 100644 --- a/docs/docs/reference-dom-elements.md +++ b/docs/docs/reference-dom-elements.md @@ -4,6 +4,9 @@ title: DOM Elements layout: docs category: Reference permalink: docs/dom-elements.html +redirect_from: "/docs/tags-and-attributes.html" +redirect_from: "/docs/dom-differences.html" +redirect_from: "/docs/special-non-dom-attributes.html" --- React implements a browser-independent DOM system for performance and cross-browser compatibility. We took the opportunity to clean up a few rough edges in browser DOM implementations. diff --git a/docs/docs/reference-react-component.md b/docs/docs/reference-react-component.md index 4891c25c0ba..fe2394b25d3 100644 --- a/docs/docs/reference-react-component.md +++ b/docs/docs/reference-react-component.md @@ -4,6 +4,8 @@ title: React.Component layout: docs category: Reference permalink: docs/react-component.html +redirect_from: "/docs/component-api.html" +redirect_from: "/docs/component-specs.html" --- [Components](/react/docs/components-and-props.html) let you split the UI into independent, reusable pieces, and think about each piece in isolation. `React.Component` is provided by [`React`](/react/docs/react-api.html). diff --git a/docs/docs/reference-react.md b/docs/docs/reference-react.md index 496a1f74431..0febbdd54a4 100644 --- a/docs/docs/reference-react.md +++ b/docs/docs/reference-react.md @@ -5,6 +5,9 @@ layout: docs category: Reference permalink: docs/react-api.html redirect_from: "/docs/reference.html" +redirect_from: "/docs/clone-with-props.html" +redirect_from: "/docs/top-level-api.html" +redirect_from: "/docs/glossary.html" --- `React` is the entry point to the React library. If you use React as a script tag, these top-level APIs are available on the `React` global. If you use ES6 with npm, you can write `import React from 'react'`. If you use ES5 with npm, you can write `var React = require('react')`. diff --git a/docs/docs/web-components.md b/docs/docs/web-components.md index de8d8ba9c10..128575a2494 100644 --- a/docs/docs/web-components.md +++ b/docs/docs/web-components.md @@ -2,6 +2,7 @@ id: web-components title: Web Components permalink: docs/web-components.html +redirect_from: "/docs/webcomponents.html" --- React and [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components) are built to solve different problems. Web Components provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. The two goals are complementary. As a developer, you are free to use React in your Web Components, or to use Web Components in React, or both. From 71382a6efd8918ae67f66d9a86261938116905dd Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 15:52:18 -0700 Subject: [PATCH 07/16] redirects for all the tips --- docs/contributing/how-to-contribute.md | 5 +++-- docs/docs/components-and-props.md | 2 ++ docs/docs/forms.md | 13 +++++++------ docs/docs/jsx-in-depth.md | 5 +++++ docs/docs/reference-dom-elements.md | 3 +++ docs/docs/reference-react-component.md | 4 ++++ docs/docs/refs-and-the-dom.md | 2 ++ 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/contributing/how-to-contribute.md b/docs/contributing/how-to-contribute.md index 61055e5b8c6..5d944c62530 100644 --- a/docs/contributing/how-to-contribute.md +++ b/docs/contributing/how-to-contribute.md @@ -4,6 +4,7 @@ title: How to Contribute layout: contributing permalink: contributing/how-to-contribute.html next: codebase-overview.html +redirect_from: "/tips/introduction.html" --- React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. @@ -26,7 +27,7 @@ If you send a pull request, please do it against the `master` branch. We maintai React follows [semantic versioning](http://semver.org/). We release patch versions for bugfixes, minor versions for new features, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. -We tag every pull request with a label marking whether the change should go in the next [patch](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-patch), [minor](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-minor), or a [major](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-major) version. We release new patch versions every few weeks, minor versions every few months, and major versions one or two times a year. +We tag every pull request with a label marking whether the change should go in the next [patch](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-patch), [minor](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-minor), or a [major](https://github.com/facebook/react/pulls?q=is%3Aopen+is%3Apr+label%3Asemver-major) version. We release new patch versions every few weeks, minor versions every few months, and major versions one or two times a year. Every significant change is documented in the [changelog file](https://github.com/facebook/react/blob/master/CHANGELOG.md). @@ -38,7 +39,7 @@ We are using [GitHub Issues](https://github.com/facebook/react/issues) for our p #### Reporting New Issues -The best way to get your bug fixed is to provide a reduced test case. This [JSFiddle template](https://jsfiddle.net/reactjs/69z2wepo/) is a great starting point. +The best way to get your bug fixed is to provide a reduced test case. This [JSFiddle template](https://jsfiddle.net/reactjs/69z2wepo/) is a great starting point. #### Security Bugs diff --git a/docs/docs/components-and-props.md b/docs/docs/components-and-props.md index 377933cb893..98bf8744218 100644 --- a/docs/docs/components-and-props.md +++ b/docs/docs/components-and-props.md @@ -4,6 +4,8 @@ title: Components and Props permalink: docs/components-and-props.html redirect_from: "/docs/reusable-components.html" redirect_from: "/docs/transferring-props.html" +redirect_from: "/tips/props-in-getInitialState-as-anti-pattern.html" +redirect_from: "/tips/communicate-between-components.html" prev: rendering-elements.html next: state-and-lifecycle.html --- diff --git a/docs/docs/forms.md b/docs/docs/forms.md index 61d276b2c01..e819cfd0fb3 100644 --- a/docs/docs/forms.md +++ b/docs/docs/forms.md @@ -2,8 +2,9 @@ id: forms title: Forms permalink: docs/forms.html -prev: -next: +prev: +next: +redirect_from: "/tips/controlled-input-null-value.html" --- ## Forms @@ -37,7 +38,7 @@ class Form extends React.Component { this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } - + handleChange(event) { this.setState({value: event.target.value}); } @@ -102,7 +103,7 @@ class Form extends React.Component { this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } - + handleChange(event) { this.setState({value: event.target.value}); } @@ -237,7 +238,7 @@ class Form extends React.Component { this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } - + handleChange(event) { this.setState({value: event.target.value}); } @@ -390,7 +391,7 @@ class Form extends React.Component { handleChange(event) { let val = event.target.value; - let checked = this.state.checked.slice(); // copy + let checked = this.state.checked.slice(); // copy if(checked.includes(val)) { checked.splice(checked.indexOf(val), 1); } else { diff --git a/docs/docs/jsx-in-depth.md b/docs/docs/jsx-in-depth.md index 22c0a85922f..701da2dcb2d 100644 --- a/docs/docs/jsx-in-depth.md +++ b/docs/docs/jsx-in-depth.md @@ -4,6 +4,11 @@ title: JSX In Depth permalink: docs/jsx-in-depth.html redirect_from: "/docs/jsx-spread.html" redirect_from: "/docs/jsx-gotchas.html" +redirect_from: "/tips/if-else-in-JSX.html" +redirect_from: "/tips/self-closing-tag.html" +redirect_from: "/tips/maximum-number-of-jsx-root-nodes.html" +redirect_from: "/tips/children-props-type.html" +redirect_from: "/tips/false-in-jsx.html" --- Fundamentally, JSX just provides syntactic sugar for the `React.createElement(component, props, ...children)` function. The JSX code: diff --git a/docs/docs/reference-dom-elements.md b/docs/docs/reference-dom-elements.md index 7f36747f07a..777e5a621bc 100644 --- a/docs/docs/reference-dom-elements.md +++ b/docs/docs/reference-dom-elements.md @@ -7,6 +7,9 @@ permalink: docs/dom-elements.html redirect_from: "/docs/tags-and-attributes.html" redirect_from: "/docs/dom-differences.html" redirect_from: "/docs/special-non-dom-attributes.html" +redirect_from: "/tips/inline-styles.html" +redirect_from: "/tips/style-props-value-px.html" +redirect_from: "/tips/dangerously-set-inner-html.html" --- React implements a browser-independent DOM system for performance and cross-browser compatibility. We took the opportunity to clean up a few rough edges in browser DOM implementations. diff --git a/docs/docs/reference-react-component.md b/docs/docs/reference-react-component.md index fe2394b25d3..686fb308123 100644 --- a/docs/docs/reference-react-component.md +++ b/docs/docs/reference-react-component.md @@ -6,6 +6,10 @@ category: Reference permalink: docs/react-component.html redirect_from: "/docs/component-api.html" redirect_from: "/docs/component-specs.html" +redirect_from: "/tips/componentWillReceiveProps-not-triggered-after-mounting.html" +redirect_from: "/tips/dom-event-listeners.html" +redirect_from: "/tips/initial-ajax.html" +redirect_from: "/tips/use-react-with-other-libraries.html" --- [Components](/react/docs/components-and-props.html) let you split the UI into independent, reusable pieces, and think about each piece in isolation. `React.Component` is provided by [`React`](/react/docs/react-api.html). diff --git a/docs/docs/refs-and-the-dom.md b/docs/docs/refs-and-the-dom.md index 3045d78291e..3e52b8d8e96 100644 --- a/docs/docs/refs-and-the-dom.md +++ b/docs/docs/refs-and-the-dom.md @@ -3,6 +3,8 @@ id: refs-and-the-dom title: Refs and the DOM redirect_from: "/docs/working-with-the-browser.html" redirect_from: "/docs/more-about-refs.html" +redirect_from: "/tips/expose-component-functions.html" +redirect_from: "/tips/children-undefined.html" permalink: docs/refs-and-the-dom.html --- From d55b0ade486c6c7085aa2167a14586fadab4237a Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 16:01:56 -0700 Subject: [PATCH 08/16] fix up prev/next links --- docs/docs/forms.md | 4 ++-- docs/docs/handling-events.md | 2 +- docs/docs/lists-conditional-rendering.md | 7 +++---- docs/docs/state-and-lifecycle.md | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/docs/forms.md b/docs/docs/forms.md index e819cfd0fb3..e5038696ced 100644 --- a/docs/docs/forms.md +++ b/docs/docs/forms.md @@ -2,8 +2,8 @@ id: forms title: Forms permalink: docs/forms.html -prev: -next: +prev: state-and-lifecycle.html +next: lifting-state-up.html redirect_from: "/tips/controlled-input-null-value.html" --- diff --git a/docs/docs/handling-events.md b/docs/docs/handling-events.md index 136d5de2532..fc0b8d4ee66 100644 --- a/docs/docs/handling-events.md +++ b/docs/docs/handling-events.md @@ -3,7 +3,7 @@ id: handling-events title: Handling Events permalink: docs/handling-events.html prev: state-and-lifecycle.html -next: lifting-state-up.html +next: forms.html --- Handling events with React elements is very similar to handling events on DOM elements. There are some syntactic differences: diff --git a/docs/docs/lists-conditional-rendering.md b/docs/docs/lists-conditional-rendering.md index 79d3da5aa50..ec3f01e8eff 100644 --- a/docs/docs/lists-conditional-rendering.md +++ b/docs/docs/lists-conditional-rendering.md @@ -1,9 +1,9 @@ --- -id: forms +id: lists-conditional-rendering title: Lists & Conditional Rendering permalink: docs/lists-conditional-rendering.html -prev: -next: +prev: components-and-props.html +next: handling-events.html --- ## Lists @@ -273,4 +273,3 @@ ReactDOM.render(, document.getElementById('root')); ``` [Try it out on Codepen.](https://codepen.io/ericnakagawa/pen/ozragV?editors=0011#0) - diff --git a/docs/docs/state-and-lifecycle.md b/docs/docs/state-and-lifecycle.md index 17beb80484f..7db65dbab0d 100644 --- a/docs/docs/state-and-lifecycle.md +++ b/docs/docs/state-and-lifecycle.md @@ -4,7 +4,7 @@ title: State and Lifecycle permalink: docs/state-and-lifecycle.html redirect_from: "/docs/interactivity-and-dynamic-uis.html" prev: components-and-props.html -next: handling-events.html +next: lists-conditional-rendering.html --- Consider the ticking clock example from the [one of the previous sections](/react/docs/rendering-elements.html#updating-the-rendered-element). From 714c9c2f9cf64ee11b333715a2e8fb1c82bd132b Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 16:04:52 -0700 Subject: [PATCH 09/16] fix error decoder --- docs/{docs-old => docs}/error-decoder.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/{docs-old => docs}/error-decoder.md (94%) diff --git a/docs/docs-old/error-decoder.md b/docs/docs/error-decoder.md similarity index 94% rename from docs/docs-old/error-decoder.md rename to docs/docs/error-decoder.md index 6e3ba74c329..8623bf5e1c3 100644 --- a/docs/docs-old/error-decoder.md +++ b/docs/docs/error-decoder.md @@ -1,7 +1,7 @@ --- id: error-decoder title: Error Decoder -permalink: docs-old/error-decoder.html +permalink: docs/error-decoder.html --- In the minified production build of React, we avoid sending down full error messages in order to reduce the number of bytes sent over the wire. From 85023f59242b98f15bd55cdc81db0ed0de915c98 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 20 Oct 2016 16:05:11 -0700 Subject: [PATCH 10/16] remove old folder --- docs/docs-old/07-forms.it-IT.md | 165 ----------------------------- docs/docs-old/07-forms.ja-JP.md | 150 -------------------------- docs/docs-old/07-forms.ko-KR.md | 159 ---------------------------- docs/docs-old/07-forms.md | 179 -------------------------------- docs/docs-old/07-forms.zh-CN.md | 168 ------------------------------ 5 files changed, 821 deletions(-) delete mode 100644 docs/docs-old/07-forms.it-IT.md delete mode 100644 docs/docs-old/07-forms.ja-JP.md delete mode 100644 docs/docs-old/07-forms.ko-KR.md delete mode 100644 docs/docs-old/07-forms.md delete mode 100644 docs/docs-old/07-forms.zh-CN.md diff --git a/docs/docs-old/07-forms.it-IT.md b/docs/docs-old/07-forms.it-IT.md deleted file mode 100644 index 60895b49e60..00000000000 --- a/docs/docs-old/07-forms.it-IT.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -id: forms-it-IT -title: Moduli -permalink: docs-old/forms-it-IT.html -prev: transferring-props-it-IT.html -next: working-with-the-browser-it-IT.html ---- - -I componenti dei moduli come ``, ` -``` - -Per l'HTML, questo approccio permette agli sviluppatori di fornire facilmente valori su più righe. Tuttavia, dal momento che React è JavaScript, non abbiamo limitazioni sulle stringhe e possiamo usare `\n` se desideriamo andare a capo. In un mondo in cui abbiamo `value` e `defaultValue`, il ruolo giocato dal nodo figlio è ambiguo. Per questa ragione, non dovresti utilizzare il nodo figlio quando imposti il valore delle ` -``` - -HTMLでは、開発者は簡単に複数行に渡る値を提供できます。しかし、ReactがJavaScriptであるので、文字列の制限を私たちは持っておらず、改行をしたい場合は `\n` を使えます。 `value` と `defaultValue` を私たちが持っている世界では、子要素が果たす役割は曖昧になっています。この理由から、以下のように ` -``` - -HTML에서는 이렇게 하면 여러 줄의 값을 쉽게 개발자가 넣을 수 있게 합니다. 하지만, React는 JavaScript기 때문에, 우리는 문자열 제한이 없고 개행이 필요하면 `\n`을 사용할 수 있습니다. 이 곳에서는 `value`와 `defaultValue`가 있고, 그것이 자식들의 역할을 모호하게 합니다. 이런 이유로, ` -``` - -For HTML, this easily allows developers to supply multiline values. However, since React is JavaScript, we do not have string limitations and can use `\n` if we want newlines. In a world where we have `value` and `defaultValue`, it is ambiguous what role children play. For this reason, you should not use children when setting ` -``` - -对 HTML 而言,让开发者设置多行的值很容易。但是,由于 React 是 JavaScript,没有字符串限制,可以使用 `\n` 实现换行。简言之,React 已经有 `value`、`defaultValue` 属性,`