Browse Source

fix all links to point to /react as root

main
Cheng Lou 11 years ago
committed by Connor McSheffrey
parent
commit
015eda5260
  1. 2
      cookbook/cb-01-introduction.md
  2. 2
      cookbook/cb-03-if-else-in-JSX tip.md
  3. 2
      cookbook/cb-03-if-else-in-JSX.md
  4. 2
      cookbook/cb-06-style-prop-value-px tip.md
  5. 2
      cookbook/cb-06-style-prop-value-px.md
  6. 2
      cookbook/cb-08-controlled-input-null-value tip.md
  7. 2
      cookbook/cb-08-controlled-input-null-value.md
  8. 2
      cookbook/cb-09-componentWillReceiveProps-not-triggered-after-mounting-tip.md
  9. 2
      cookbook/cb-09-componentWillReceiveProps-not-triggered-after-mounting.md
  10. 2
      cookbook/cb-11-dom-event-listeners tip.md
  11. 2
      cookbook/cb-11-dom-event-listeners.md

2
cookbook/cb-01-introduction.md

@ -5,7 +5,7 @@ layout: docs
permalink: introduction.html permalink: introduction.html
--- ---
The React.js cookbook provides solutions for common questions asked when working with the React framework. It's written in the [cookbook format](http://shop.oreilly.com/category/series/cookbooks.do) commonly used by O'Reilly Media. See [Inline Styles](inline-styles.html) recipe as an example. The React.js cookbook provides solutions for common questions asked when working with the React framework. It's written in the [cookbook format](http://shop.oreilly.com/category/series/cookbooks.do) commonly used by O'Reilly Media. See [Inline Styles](/react/docs/cookbook/inline-styles.html) recipe as an example.
### Contributing ### Contributing

2
cookbook/cb-03-if-else-in-JSX tip.md

@ -26,4 +26,4 @@ What you're searching for is ternary expression:
React.renderComponent(<div id={true ? 'msg' : ''}>Hello World!</div>, mountNode); React.renderComponent(<div id={true ? 'msg' : ''}>Hello World!</div>, mountNode);
``` ```
Try the [JSX compiler](http://facebook.github.io/react/jsx-compiler.html). Try the [JSX compiler](/react/jsx-compiler.html).

2
cookbook/cb-03-if-else-in-JSX.md

@ -31,4 +31,4 @@ React.renderComponent(<div id={true ? 'msg' : ''}>Hello World!</div>, mountNode)
``` ```
### Discussion ### Discussion
Try the [JSX compiler](http://facebook.github.io/react/jsx-compiler.html). Try the [JSX compiler](react/jsx-compiler.html).

2
cookbook/cb-06-style-prop-value-px tip.md

@ -14,7 +14,7 @@ var divStyle = {height: 10}; // rendered as "height:10px"
React.renderComponent(<div style={divStyle}>Hello World!</div>, mountNode); React.renderComponent(<div style={divStyle}>Hello World!</div>, mountNode);
``` ```
See [Inline Styles](inline-styles-tip.html) for more info. See [Inline Styles](/react/docs/cookbook/inline-styles-tip.html) for more info.
Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix: Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix:

2
cookbook/cb-06-style-prop-value-px.md

@ -19,7 +19,7 @@ React.renderComponent(<div style={divStyle}>Hello World!</div>, mountNode);
``` ```
### Discussion ### Discussion
See [Inline Styles](inline-styles.html) for more info. See [Inline Styles](/react/docs/cookbook/inline-styles.html) for more info.
Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix: Sometimes you _do_ want to keep the CSS properties unitless. Here's a list of properties that won't get the automatic "px" suffix:

2
cookbook/cb-08-controlled-input-null-value tip.md

@ -5,7 +5,7 @@ layout: docs
permalink: controlled-input-null-value-tip.html permalink: controlled-input-null-value-tip.html
--- ---
Specifying the `value` prop on a [controlled component](forms.html) prevents the user from changing the input unless you desire so. Specifying the `value` prop on a [controlled component](/react/docs/cookbook/forms.html) prevents the user from changing the input unless you desire so.
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`. 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`.

2
cookbook/cb-08-controlled-input-null-value.md

@ -6,7 +6,7 @@ permalink: controlled-input-null-value.html
--- ---
### Problem ### Problem
You specified a `value` parameter for your form input, but the input value can still be modified, contrary to [what you'd expect](forms.html). You specified a `value` parameter for your form input, but the input value can still be modified, contrary to [what you'd expect](/react/docs/cookbook/forms.html).
### Solution ### Solution
You might have accidentally set `value` to `undefined` or `null`. The snippet below shows this phenomenon; after a second, the text becomes editable. You might have accidentally set `value` to `undefined` or `null`. The snippet below shows this phenomenon; after a second, the text becomes editable.

2
cookbook/cb-09-componentWillReceiveProps-not-triggered-after-mounting-tip.md

@ -5,6 +5,6 @@ layout: docs
permalink: componentWillReceiveProps-not-triggered-after-mounting-tip.html permalink: componentWillReceiveProps-not-triggered-after-mounting-tip.html
--- ---
`componentWillReceiveProps` isn't triggered after the node is put on scene. This is by design. Check out [other lifecycle methods](component-specs.html) for the one that suits your needs. `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.
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. 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.

2
cookbook/cb-09-componentWillReceiveProps-not-triggered-after-mounting.md

@ -9,7 +9,7 @@ permalink: componentWillReceiveProps-not-triggered-after-mounting.html
`componentWillReceiveProps` isn't triggered after the node is put on scene. `componentWillReceiveProps` isn't triggered after the node is put on scene.
### Solution ### Solution
This is by design. Check out [other lifecycle methods](component-specs.html) for the one that suits your needs. This is by design. Check out [other lifecycle methods](/react/docs/cookbook/component-specs.html) for the one that suits your needs.
### Discussion ### Discussion
`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. `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.

2
cookbook/cb-11-dom-event-listeners tip.md

@ -7,7 +7,7 @@ permalink: dom-event-listeners-tip.html
> Note: > Note:
> >
> This entry shows how to attach DOM events not provided by React ([check here for more info](events.html)). This is good for integrations with other libraries such as jQuery. > 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.
This example displays the window width: This example displays the window width:

2
cookbook/cb-11-dom-event-listeners.md

@ -11,7 +11,7 @@ You want to listen to an event inside a component.
### Solution ### Solution
> Note: > Note:
> >
> This entry shows how to attach DOM events not provided by React ([check here for more info](events.html)). This is good for integrations with other libraries such as jQuery. > 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.
This example displays the window width: This example displays the window width:

Loading…
Cancel
Save