mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
React.renderComponent --> React.render
Also fixed a spelling mistake.
This commit is contained in:
@@ -6,7 +6,7 @@ prev: jsx-in-depth.html
|
||||
next: jsx-gotchas.html
|
||||
---
|
||||
|
||||
If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:
|
||||
If you know all the properties that you want to place on a component ahead of time, it is easy to use JSX:
|
||||
|
||||
```javascript
|
||||
var component = <Component foo={x} bar={y} />;
|
||||
|
||||
@@ -37,7 +37,7 @@ var FancyCheckbox = React.createClass({
|
||||
);
|
||||
}
|
||||
});
|
||||
React.renderComponent(
|
||||
React.render(
|
||||
<FancyCheckbox checked={true} onClick={console.log}>
|
||||
Hello world!
|
||||
</FancyCheckbox>,
|
||||
@@ -70,7 +70,7 @@ var FancyCheckbox = React.createClass({
|
||||
);
|
||||
}
|
||||
});
|
||||
React.renderComponent(
|
||||
React.render(
|
||||
<FancyCheckbox checked={true} onClick={console.log}>
|
||||
Hello world!
|
||||
</FancyCheckbox>,
|
||||
|
||||
Reference in New Issue
Block a user