From 79b09d95977eb08ca0e48e100caefb3fc55e5769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Thu, 14 Nov 2013 14:59:41 -0800 Subject: [PATCH] Merge pull request #362 from mcsheffrey/feat-documentation-cookbook React Tips documentation --- docs/README.md | 1 + docs/_config.yml | 29 +++++++++ docs/_includes/nav_docs.html | 15 +++++ docs/_layouts/default.html | 1 + docs/_layouts/tips.html | 25 ++++++++ docs/tips/01-introduction.md | 13 ++++ docs/tips/02-inline-styles.md | 24 +++++++ docs/tips/03-if-else-in-JSX.md | 42 +++++++++++++ docs/tips/04-self-closing-tag.md | 14 +++++ .../05-maximum-number-of-jsx-root-nodes.md | 12 ++++ docs/tips/06-style-props-value-px.md | 29 +++++++++ docs/tips/07-children-props-type.md | 49 +++++++++++++++ docs/tips/08-controlled-input-null-value.md | 24 +++++++ ...ceiveProps-not-triggered-after-mounting.md | 12 ++++ ...rops-in-getInitialState-as-anti-pattern.md | 62 +++++++++++++++++++ docs/tips/11-dom-event-listeners.md | 44 +++++++++++++ docs/tips/12-initial-ajax.md | 47 ++++++++++++++ docs/tips/13-false-in-jsx.md | 32 ++++++++++ 18 files changed, 475 insertions(+) create mode 100644 docs/_layouts/tips.html create mode 100644 docs/tips/01-introduction.md create mode 100644 docs/tips/02-inline-styles.md create mode 100644 docs/tips/03-if-else-in-JSX.md create mode 100644 docs/tips/04-self-closing-tag.md create mode 100644 docs/tips/05-maximum-number-of-jsx-root-nodes.md create mode 100644 docs/tips/06-style-props-value-px.md create mode 100644 docs/tips/07-children-props-type.md create mode 100644 docs/tips/08-controlled-input-null-value.md create mode 100644 docs/tips/09-componentWillReceiveProps-not-triggered-after-mounting.md create mode 100644 docs/tips/10-props-in-getInitialState-as-anti-pattern.md create mode 100644 docs/tips/11-dom-event-listeners.md create mode 100644 docs/tips/12-initial-ajax.md create mode 100644 docs/tips/13-false-in-jsx.md diff --git a/docs/README.md b/docs/README.md index 4db50f03e119e..3d14a9bfd8419 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,6 +21,7 @@ Once you have RubyGems and installed Bundler (via `gem install bundler`), use it ```sh $ cd react/docs $ bundle install # Might need sudo. +$ npm install # Might need sudo. ``` ### Instructions diff --git a/docs/_config.yml b/docs/_config.yml index e99f4538a4fc0..35d586129fd72 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -69,3 +69,32 @@ nav_docs_sections: title: Event System - id: dom-differences title: DOM Differences +nav_tips: +- title: Tips + items: + - id: introduction + title: Introduction + - id: inline-styles + title: Inline Styles + - id: if-else-in-JSX + title: If-Else in JSX + - id: self-closing-tag + title: Self-Closing Tag + - id: maximum-number-of-jsx-root-nodes + title: Maximum Number of JSX Root Nodes + - id: style-props-value-px + title: Shorthand for Specifying Pixel Values in style props + - id: children-props-type + title: Type of the Children props + - id: controlled-input-null-value + title: Value of null for Controlled Input + - id: componentWillReceiveProps-not-triggered-after-mounting + title: componentWillReceiveProps Not Triggered After Mounting + - id: props-in-getInitialState-as-anti-pattern + title: Props in getInitialState Is an Anti-Pattern + - id: dom-event-listeners + title: DOM Event Listeners in a Component + - id: initial-ajax + title: Load Initial Data via AJAX + - id: false-in-jsx + title: False in JSX diff --git a/docs/_includes/nav_docs.html b/docs/_includes/nav_docs.html index e71ece3cb223e..98e1a15197e21 100644 --- a/docs/_includes/nav_docs.html +++ b/docs/_includes/nav_docs.html @@ -1,4 +1,5 @@ diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 61b06b8adb1e0..f013a7286c2d8 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -74,6 +74,7 @@
+