Skip to content

Commit 896b4fc

Browse files
committed
Update README on PropType
1 parent e594694 commit 896b4fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Then restart your development server.
9090

9191
This will:
9292

93-
- add some `//= require`s to `application.js`
93+
- add some `//= require`s to `application.js`
9494
- add a `components/` directory for React components
9595
- add `server_rendering.js` for [server-side rendering](#server-side-rendering)
9696

@@ -108,7 +108,7 @@ window.Post = React.createClass({
108108
// or, equivalent:
109109
class Post extends React.Component {
110110
render() {
111-
return <h1>{this.props.title}</h1>
111+
return <h1>{this.props.title}</h1>
112112
}
113113
}
114114
```
@@ -395,11 +395,11 @@ rails g react:component Post title:string published:bool published_by:instanceOf
395395
would generate:
396396

397397
```js
398-
var Post = React.createClass({
398+
var Post = createReactClass({
399399
propTypes: {
400-
title: React.PropTypes.string,
401-
published: React.PropTypes.bool,
402-
publishedBy: React.PropTypes.instanceOf(Person)
400+
title: PropTypes.string,
401+
published: PropTypes.bool,
402+
publishedBy: PropTypes.instanceOf(Person)
403403
},
404404

405405
render: function() {

0 commit comments

Comments
 (0)