Skip to content

Commit 9e0ad7d

Browse files
committed
Fix outdated README notes on the component generator
1 parent 0c4bd1b commit 9e0ad7d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ rails generate react:component Post title:string body:string published:bool publ
218218
would generate the following in `app/assets/javascripts/components/post.js.jsx`:
219219

220220
```jsx
221-
/** @jsx React.DOM */
222221
var Post = React.createClass({
223222
propTypes: {
224223
title: React.PropTypes.string,
@@ -228,26 +227,28 @@ var Post = React.createClass({
228227
},
229228

230229
render: function() {
231-
return <div>
232-
<div>Title: {this.props.title}</div>
233-
<div>Body: {this.props.body}</div>
234-
<div>Published: {this.props.published}</div>
235-
<div>Published By: {this.props.published_by}</div>
236-
</div>;
230+
return (
231+
<div>
232+
<div>Title: {this.props.title}</div>
233+
<div>Body: {this.props.body}</div>
234+
<div>Published: {this.props.published}</div>
235+
<div>Published By: {this.props.published_by}</div>
236+
</div>
237+
);
237238
}
238-
})
239+
});
239240
```
240241

241242
The generator can use the following arguments to create basic propTypes:
242243

243244
* any
244245
* array
245246
* bool
246-
* component
247+
* element
247248
* func
248249
* number
249250
* object
250-
* renderable
251+
* node
251252
* shape
252253
* string
253254

0 commit comments

Comments
 (0)