Skip to content

Commit

Permalink
ReactDOM->React.DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
petehunt committed Jun 1, 2013
1 parent ebff2bc commit 095fccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The first thing you'll notice is the XML-ish syntax in your JavaScript. We have
var CommentBox = React.createClass({
render: function() {
return (
ReactDOM.div({
React.DOM.div({
className: 'commentBox',
children: 'Hello, world! I am a CommentBox.'
})
Expand Down Expand Up @@ -158,7 +158,7 @@ var CommentBox = React.createClass({
});
```

Notice how we're mixing HTML tags and components we've built. HTML components are regular React components, just like the ones you define, with one difference. The JSX compiler will automatically rewrite HTML tags to "ReactDOM.tagName" expressions and leave everything else alone. This is to prevent the pollution of the global namespace.
Notice how we're mixing HTML tags and components we've built. HTML components are regular React components, just like the ones you define, with one difference. The JSX compiler will automatically rewrite HTML tags to "React.DOM.tagName" expressions and leave everything else alone. This is to prevent the pollution of the global namespace.

## Component Properties

Expand Down

0 comments on commit 095fccb

Please sign in to comment.