From 809e28223ef46d7d0459d6a5d0073aac31421d58 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Thu, 3 Nov 2016 17:14:53 -0700 Subject: [PATCH] forms breakup --- _data/nav_docs.yml | 3 +- docs/forms.md | 511 +++++--------------------------- docs/uncontrolled-components.md | 60 ++++ 3 files changed, 138 insertions(+), 436 deletions(-) create mode 100644 docs/uncontrolled-components.md diff --git a/_data/nav_docs.yml b/_data/nav_docs.yml index 1be1ce3c..a6be939b 100644 --- a/_data/nav_docs.yml +++ b/_data/nav_docs.yml @@ -34,6 +34,8 @@ title: Typechecking With PropTypes - id: refs-and-the-dom title: Refs and the DOM + - id: uncontrolled-components + title: Uncontrolled Components - id: optimizing-performance title: Optimizing Performance - id: react-without-es6 @@ -80,4 +82,3 @@ title: Shallow Compare - id: two-way-binding-helpers title: Two-way Binding Helpers - diff --git a/docs/forms.md b/docs/forms.md index dee0be88..fdab5409 100644 --- a/docs/forms.md +++ b/docs/forms.md @@ -9,266 +9,89 @@ redirect_from: - "docs/forms-zh-CN.html" --- -Form components such as ``, ` -``` - -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 ` ``` -If you *do* decide to use children, they will behave like `defaultValue`. +In React, a `