README.md in react-rails-2.4.6 vs README.md in react-rails-2.4.7
- old
+ new
@@ -9,11 +9,11 @@
React-Rails is a flexible tool to use [React](http://facebook.github.io/react/) with Rails. It:
* Automatically renders React server-side and client-side
* Supports Webpacker 3.x, 2.x, 1.1+
* Supports Sprockets 4.x, 3.x, 2.x
-* Lets you use [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html), [ES6](http://es6-features.org/), [Coffeescript](http://coffeescript.org/)
+* Lets you use [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html), [ES6](http://es6-features.org/), [TypeScript](https://www.typescriptlang.org/), [CoffeeScript](http://coffeescript.org/)
Example app code available here: https://github.com/BookOfGreg/react-rails-example-app
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -473,17 +473,17 @@
publishedBy: PropTypes.instanceOf(Person)
},
render: function() {
return (
- <div>
- <div>Title: {this.props.title}</div>
- <div>Published: {this.props.published}</div>
- <div>Published By: {this.props.publishedBy}</div>
- </div>
+ <React.Fragment>
+ Title: {this.props.title}
+ Published: {this.props.published}
+ Published By: {this.props.publishedBy}
+ </React.Fragment>
);
}
-};
+});
```
The generator also accepts options:
- `--es6`: use `class ComponentName extends React.Component`