Browse Source

Remove numbers from URLs.

This will let us keep docs in order on the filesystem but have
reasonable permalinks. If we add something at 02- it doesn't result in
lots of broken links.
main
Paul O’Shannessy 12 years ago
parent
commit
f2345ba2e2
  1. 1
      _config.yml
  2. 5
      docs/01-why-react.md
  3. 7
      docs/02-displaying-data.md
  4. 9
      docs/02.1-jsx-in-depth.md
  5. 7
      docs/02.2-jsx-gotchas.md
  6. 9
      docs/03-interactivity-and-dynamic-uis.md
  7. 7
      docs/04-multiple-components.md
  8. 9
      docs/05-reusable-components.md
  9. 7
      docs/06-forms.md
  10. 9
      docs/07-working-with-the-browser.md
  11. 7
      docs/07.1-more-about-refs.md
  12. 7
      docs/08-tooling-integration.md
  13. 7
      docs/09-reference.md

1
_config.yml

@ -15,3 +15,4 @@ name: React
markdown: redcarpet
react_version: 0.4.0a
description: A JavaScript library for building user interfaces
relative_permalinks: true

5
docs/01-why-react.md

@ -1,8 +1,9 @@
---
id: 01-why-react
id: why-react
title: Why React?
layout: docs
next: 02-displaying-data.html
permalink: why-react.html
next: displaying-data.html
---
React is a JavaScript library for creating user interfaces by Facebook and Instagram. Many people choose to think of React as the **V** in **[MVC](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)**.

7
docs/02-displaying-data.md

@ -1,9 +1,10 @@
---
id: 02-displaying-data
id: displaying-data
title: Displaying Data
layout: docs
prev: 01-why-react.html
next: 02.1-jsx-in-depth.html
permalink: displaying-data.html
prev: why-react.html
next: jsx-in-depth.html
---
The most basic thing you can do with a UI is display some data. React makes it easy to display data, and automatically keeps it up-to-date when the data changes.

9
docs/02.1-jsx-in-depth.md

@ -1,9 +1,10 @@
---
id: 02.1-jsx-in-depth
id: jsx-in-depth
title: JSX in Depth
layout: docs
prev: 02-displaying-data.html
next: 02.2-jsx-gotchas.html
permalink: jsx-in-depth.html
prev: displaying-data.html
next: jsx-gotchas.html
---
JSX is a JavaScript XML syntax transform recommended (but not required) for use
with React.
@ -172,4 +173,4 @@ efforts include:
- JSX neither provides nor requires a runtime library.
- JSX does not alter or add to the semantics of JavaScript.
JSX is similar to HTML, but not exactly the same. See [JSX gotchas](./02.2-jsx-gotchas.html) for some key differences.
JSX is similar to HTML, but not exactly the same. See [JSX gotchas](./jsx-gotchas.html) for some key differences.

7
docs/02.2-jsx-gotchas.md

@ -1,9 +1,10 @@
---
id: 02.2-jsx-gotchas
id: jsx-gotchas
title: JSX gotchas
layout: docs
prev: 02.1-jsx-in-depth.html
next: 03-interactivity-and-dynamic-uis.html
permalink: jsx-gotchas.html
prev: jsx-in-depth.html
next: interactivity-and-dynamic-uis.html
---
JSX looks like HTML but there are some important differences you may run into.

9
docs/03-interactivity-and-dynamic-uis.md

@ -1,11 +1,12 @@
---
id: 03-interactivity-and-dynamic-uis
id: interactivity-and-dynamic-uis
title: Interactivity and dynamic UIs
layout: docs
prev: 02.2-jsx-gotchas.html
next: 04-multiple-components.html
permalink: interactivity-and-dynamic-uis.html
prev: jsx-gotchas.html
next: multiple-components.html
---
You've already [learned how to display data](./02-displaying-data.html) with React. Now let's look at how to make our UIs interactive.
You've already [learned how to display data](./displaying-data.html) with React. Now let's look at how to make our UIs interactive.
## A Simple Example

7
docs/04-multiple-components.md

@ -1,9 +1,10 @@
---
id: 04-multiple-components
id: multiple-components
title: Multiple Components
layout: docs
prev: 03-interactivity-and-dynamic-uis.html
next: 05-reusable-components.html
permalink: multiple-components.html
prev: interactivity-and-dynamic-uis.html
next: reusable-components.html
---
So far, we've looked at how to write a single component to display data and handle user input. Next let's examine one of React's finest features: composability.

9
docs/05-reusable-components.md

@ -1,9 +1,10 @@
---
id: 05-reusable-components
id: reusable-components
title: Reusable Components
layout: docs
prev: 04-multiple-components.html
next: 06-forms.html
permalink: reusable-components.html
prev: multiple-components.html
next: forms.html
---
When designing interfaces, break down the common design elements (buttons, form fields, layout components, etc) into reusable components with well-defined interfaces. That way, the next time you need to build some UI you can write much less code, which means faster development time, less bugs, and less bytes down the wire.
@ -40,7 +41,7 @@ React.renderComponent(
Components are the best way to reuse code in React, but sometimes very different components may share some common functionality. These are sometimes called [cross-cutting concerns](http://en.wikipedia.org/wiki/Cross-cutting_concern). React provides `mixins` to solve this problem.
One common use case is a component wanting to update itself on a time interval. It's easy to use `setInterval()`, but it's important to cancel your interval when you don't need it anymore to save memory. React provides [lifecycle methods](./06-working-with-the-browser.html) that let you know when a component is about to be created or destroyed. Let's create a simple mixin that uses these methods to provide an easy `setInterval()` function that will automatically get cleaned up when your component is destroyed.
One common use case is a component wanting to update itself on a time interval. It's easy to use `setInterval()`, but it's important to cancel your interval when you don't need it anymore to save memory. React provides [lifecycle methods](./working-with-the-browser.html) that let you know when a component is about to be created or destroyed. Let's create a simple mixin that uses these methods to provide an easy `setInterval()` function that will automatically get cleaned up when your component is destroyed.
```javascript
/** @jsx React.DOM */

7
docs/06-forms.md

@ -1,9 +1,10 @@
---
id: 06-forms
id: forms
title: Forms
layout: docs
prev: 05-reusable-components.html
next: 07-working-with-the-browser.html
permalink: forms.html
prev: reusable-components.html
next: working-with-the-browser.html
---
Form components such as `<input>`, `<textarea>`, and `<option>` differ from other native components because they can be mutated via user interactions. These components provide interfaces that make it easier to manage forms in response to user interactions.

9
docs/07-working-with-the-browser.md

@ -1,9 +1,10 @@
---
id: 07-working-with-the-browser
id: working-with-the-browser
title: Working With the Browser
layout: docs
prev: 06-forms.html
next: 07.1-more-about-refs.html
permalink: working-with-the-browser.html
prev: forms.html
next: more-about-refs.html
---
React provides powerful abstractions that free you from touching the DOM directly in most cases, but sometimes you simply need to access the underlying API, perhaps to work with a third-party library or existing code.
@ -55,7 +56,7 @@ React.renderComponent(
## More About Refs
To learn more about refs, including ways to use them effectively, see our [more about refs](./07.1-more-about-refs.html) documentation.
To learn more about refs, including ways to use them effectively, see our [more about refs](./more-about-refs.html) documentation.
## Component Lifecycle

7
docs/07.1-more-about-refs.md

@ -1,9 +1,10 @@
---
id: 07.1-more-about-refs
id: more-about-refs
title: More About Refs
layout: docs
prev: 07-working-with-the-browser.html
next: 08-tooling-integration.html
permalink: more-about-refs.html
prev: working-with-the-browser.html
next: tooling-integration.html
---
After returning the structure of your UI from the render method, you may find yourself wanting to "reach out" and invoke methods on component instances returned from render. Often, doing something like this isn't necessary for making data flow through your application, because the Reactive data flow always ensures that the most recent `props` are sent to each child that is output from `render()`. However there are a few cases, where it still might be necessary or beneficial.

7
docs/08-tooling-integration.md

@ -1,9 +1,10 @@
---
id: 08-tooling-integration
id: tooling-integration
title: Tooling integration
layout: docs
prev: 07.1-more-about-refs.html
next: 09-reference.html
permalink: tooling-integration.html
prev: more-about-refs.html
next: reference.html
---
Every project uses a different system for building and deploying JavaScript. We've tried to make React as environment-agnostic as possible.

7
docs/09-reference.md

@ -1,8 +1,9 @@
---
id: 09-reference
id: reference
title: Reference
layout: docs
prev: 08-tooling-integration.html
permalink: reference.html
prev: tooling-integration.html
---
## Examples
@ -165,7 +166,7 @@ componentDidUpdate(object prevProps, object prevState, DOMElement domNode)
componentWillUnmount()
```
See the [working with the browser](./07-working-with-the-browser.html) documentation for more details on these lifecycle methods.
See the [working with the browser](./working-with-the-browser.html) documentation for more details on these lifecycle methods.
## DOM Differences

Loading…
Cancel
Save