@samitouri / QOS-React-2 / commits / bd535bd51c

Renamed Cookbook references to tips. Reworded intro (sounded weird because it still referenced cookbooks. Updated some entry ID's (some side nav links didn't match entry permalinks)

Connor McSheffrey committed Nov 11, 2013 at 21:00 UTC bd535bd51c2f24618a8a8b2990fa9f350955db3b
16 files changed +33 -31
docs/_config.yml
+4 -4
@@ -69,8 +69,8 @@ nav_docs_sections:
69 title: Event System
70 - id: dom-differences
71 title: DOM Differences
72 -nav_cookbook:
73 -- title: Cookbook
72 +nav_tips:
73 +- title: Tips
74 items:
75 - id: introduction
76 title: Introduction
@@ -80,7 +80,7 @@ nav_cookbook:
80 title: If-Else in JSX
81 - id: self-closing-tag
82 title: Self-Closing Tag
83 - - id: jsx-root-node-count
83 + - id: maximum-number-of-jsx-root-nodes
84 title: Maximum Number of JSX Root Nodes
85 - id: style-props-value-px
86 title: Shorthand for Specifying Pixel Values in style props
@@ -90,7 +90,7 @@ nav_cookbook:
90 title: Value of null for Controlled Input
91 - id: componentWillReceiveProps-not-triggered-after-mounting
92 title: componentWillReceiveProps Not Triggered After Mounting
93 - - id: props-in-getInitialSate-as-anti-pattern
93 + - id: props-in-getInitialState-as-anti-pattern
94 title: Props in getInitialState Is an Anti-Pattern
95 - id: dom-event-listeners
96 title: DOM Event Listeners in a Component
docs/_includes/nav_docs.html
+3 -3
@@ -26,14 +26,14 @@
26 </div>
27 {% endfor %}
28
29 - <!-- Cookbook Nav -->
30 - {% for section in site.nav_cookbook %}
29 + <!-- Tips Nav -->
30 + {% for section in site.nav_tips %}
31 <div class="nav-docs-section">
32 <h3>{{ section.title }}</h3>
33 <ul>
34 {% for item in section.items %}
35 <li>
36 - <a href="/react/cookbook/{{ item.id }}.html"{% if page.id == item.id %} class="active"{% endif %}>{{ item.title }}</a>
36 + <a href="/react/tips/{{ item.id }}.html"{% if page.id == item.id %} class="active"{% endif %}>{{ item.title }}</a>
37 </li>
38 {% endfor %}
39 </ul>
docs/_layouts/tips.html renamed
+3 -3
@@ -1,6 +1,6 @@
1 ---
2 layout: default
3 -sectionid: cookbook
3 +sectionid: tips
4 ---
5
6 <section class="content wrap documentationContent">
@@ -13,10 +13,10 @@ sectionid: cookbook
13
14 <div class="docs-prevnext">
15 {% if page.prev %}
16 - <a class="docs-prev" href="/react/cookbook/{{ page.prev }}">&larr; Prev</a>
16 + <a class="docs-prev" href="/react/tips/{{ page.prev }}">&larr; Prev</a>
17 {% endif %}
18 {% if page.next %}
19 - <a class="docs-next" href="/react/cookbook/{{ page.next }}">Next &rarr;</a>
19 + <a class="docs-next" href="/react/tips/{{ page.next }}">Next &rarr;</a>
20 {% endif %}
21 </div>
22
docs/tips/01-introduction.md renamed
+5 -3
@@ -1,13 +1,15 @@
1 ---
2 id: introduction
3 title: Introduction
4 -layout: cookbook
4 +layout: tips
5 permalink: introduction.html
6 next: inline-styles.html
7 ---
8
9 -The React cookbook provides common React tips, bite-sized information that can surprisingly answer lots of questions you might have had and warn you against common pitfalls.
9 +The React tips section provides bite-sized information that can answer lots of questions you might have and warn you against common pitfalls.
10
11 ### Contributing
12
13 -Submit a pull request to the [React repo](https://github.com/facebook/react) following the cookbook entries' style. If you have a recipe that needs review prior to submitting a PR you can find help in the [#reactjs IRC on freenode](irc://chat.freenode.net/reactjs) or the [reactjs Google group](http://groups.google.com/group/reactjs).
13 +Submit a pull request to the [React repo](https://github.com/facebook/react) following the cookbook entries' style. If you have a recipe that needs review prior to submitting a PR you can find help in the [#reactjs IRC on freenode](irc://chat.freenode.net/reactjs) or the [reactjs Google group](http://groups.google.com/group/reactjs). Also, check the [Tips Wiki][1] for entries in-progress and general guidelines on writing React tips.
14 +
15 +[1]: https://github.com/facebook/react/wiki/Tips-(Previously-Cookbook)
docs/tips/02-inline-styles.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: inline-styles
3 title: Inline Styles
4 -layout: cookbook
4 +layout: tips
5 permalink: inline-styles.html
6 next: if-else-in-JSX.html
7 prev: introduction.html
docs/tips/03-if-else-in-JSX.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: if-else-in-JSX
3 title: If-Else in JSX
4 -layout: cookbook
4 +layout: tips
5 permalink: if-else-in-JSX.html
6 prev: inline-styles.html
7 next: self-closing-tag.html
docs/tips/04-self-closing-tag.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: self-closing-tag
3 title: Self-Closing Tag
4 -layout: cookbook
4 +layout: tips
5 permalink: self-closing-tag.html
6 prev: if-else-in-JSX.html
7 next: maximum-number-of-jsx-root-nodes.html
docs/tips/05-maximum-number-of-jsx-root-nodes.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: maximum-number-of-jsx-root-nodes
3 title: Maximum Number of JSX Root Nodes
4 -layout: cookbook
4 +layout: tips
5 permalink: maximum-number-of-jsx-root-nodes.html
6 prev: self-closing-tag.html
7 next: style-props-value-px.html
docs/tips/06-style-props-value-px.md renamed
+3 -3
@@ -1,7 +1,7 @@
1 ---
2 -id: style-prop-value-px
2 +id: style-props-value-px
3 title: Shorthand for Specifying Pixel Values in style props
4 -layout: cookbook
4 +layout: tips
5 permalink: style-props-value-px.html
6 prev: maximum-number-of-jsx-root-nodes.html
7 next: children-props-type.html
@@ -16,7 +16,7 @@ var divStyle = {height: 10}; // rendered as "height:10px"
16 React.renderComponent(<div style={divStyle}>Hello World!</div>, mountNode);
17 ```
18
19 -See [Inline Styles](/react/docs/cookbook/inline-styles-tip.html) for more info.
19 +See [Inline Styles](/react/docs/tips/inline-styles-tip.html) for more info.
20
21 Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix:
22
docs/tips/07-children-props-type.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: children-props-type
3 title: Type of the Children props
4 -layout: cookbook
4 +layout: tips
5 permalink: children-props-type.html
6 prev: style-props-value-px.html
7 next: controlled-input-null-value.html
docs/tips/08-controlled-input-null-value.md renamed
+2 -2
@@ -1,13 +1,13 @@
1 ---
2 id: controlled-input-null-value
3 title: Value of null for Controlled Input
4 -layout: cookbook
4 +layout: tips
5 permalink: controlled-input-null-value.html
6 prev: children-props-type.html
7 next: componentWillReceiveProps-not-triggered-after-mounting.html
8 ---
9
10 -Specifying the `value` prop on a [controlled component](/react/docs/cookbook/forms.html) prevents the user from changing the input unless you desire so.
10 +Specifying the `value` prop on a [controlled component](/react/docs/tips/forms.html) prevents the user from changing the input unless you desire so.
11
12 You might have run into a problem where `value` is specified, but the input can still be changed without consent. In this case, you might have accidentally set `value` to `undefined` or `null`.
13
docs/tips/09-componentWillReceiveProps-not-triggered-after-mounting.md renamed
+2 -2
@@ -1,12 +1,12 @@
1 ---
2 id: componentWillReceiveProps-not-triggered-after-mounting
3 title: componentWillReceiveProps Not Triggered After Mounting
4 -layout: cookbook
4 +layout: tips
5 permalink: componentWillReceiveProps-not-triggered-after-mounting.html
6 prev: controlled-input-null-value.html
7 next: props-in-getInitialState-as-anti-pattern.html
8 ---
9
10 -`componentWillReceiveProps` isn't triggered after the node is put on scene. This is by design. Check out [other lifecycle methods](/react/docs/cookbook/component-specs.html) for the one that suits your needs.
10 +`componentWillReceiveProps` isn't triggered after the node is put on scene. This is by design. Check out [other lifecycle methods](/react/docs/tips/component-specs.html) for the one that suits your needs.
11
12 The reason for that is because `componentWillReceiveProps` often handles the logic of comparing with the old props and acting upon changes; not triggering it at mounting (where there are no old props) helps in defining what the method does.
docs/tips/10-props-in-getInitialState-as-anti-pattern.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: props-in-getInitialState-as-anti-pattern
3 title: Props in getInitialState Is an Anti-Pattern
4 -layout: cookbook
4 +layout: tips
5 permalink: props-in-getInitialState-as-anti-pattern.html
6 prev: componentWillReceiveProps-not-triggered-after-mounting.html
7 next: dom-event-listeners.html
docs/tips/11-dom-event-listeners.md renamed
+2 -2
@@ -1,7 +1,7 @@
1 ---
2 id: dom-event-listeners
3 title: DOM Event Listeners in a Component
4 -layout: cookbook
4 +layout: tips
5 permalink: dom-event-listeners.html
6 prev: props-in-getInitialState-as-anti-pattern.html
7 next: initial-ajax.html
@@ -9,7 +9,7 @@ next: initial-ajax.html
9
10 > Note:
11 >
12 -> This entry shows how to attach DOM events not provided by React ([check here for more info](/react/docs/cookbook/events.html)). This is good for integrations with other libraries such as jQuery.
12 +> This entry shows how to attach DOM events not provided by React ([check here for more info](/react/docs/tips/events.html)). This is good for integrations with other libraries such as jQuery.
13
14 Try to resize the window:
15
docs/tips/12-initial-ajax.md renamed
+1 -1
@@ -1,7 +1,7 @@
1 ---
2 id: initial-ajax
3 title: Load Initial Data via AJAX
4 -layout: cookbook
4 +layout: tips
5 permalink: initial-ajax.html
6 prev: dom-event-listeners.html
7 next: false-in-jsx.html
docs/tips/13-false-in-jsx.md renamed
+2 -2
@@ -1,7 +1,7 @@
1 ---
2 -id: false-in-jsx-tip
2 +id: false-in-jsx
3 title: False in JSX
4 -layout: cookbook
4 +layout: tips
5 permalink: false-in-jsx.html
6 prev: initial-ajax.html
7 ---