|
@ -29,7 +29,7 @@ var myDivElement = <div className="foo" />; |
|
|
React.render(myDivElement, document.body); |
|
|
React.render(myDivElement, document.body); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
To render a React Component, just a local variable that starts with an upper-case letter: |
|
|
To render a React Component, just create a local variable that starts with an upper-case letter: |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
var MyComponent = React.createClass({/*...*/}); |
|
|
var MyComponent = React.createClass({/*...*/}); |
|
|