Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ Component File Name | `react_component` call
`app/javascript/components/SampleComponent.js` | `react_component("SampleComponent")`
`app/javascript/components/SampleComponent.js.jsx` | Has to be renamed to SampleComponent.jsx, then use `react_component("SampleComponent")`

### Typescript support

If you want to use React-Rails with Typescript, simply run the installer and add @types:
```
$ bundle exec rails webpacker:install:typescript
$ yarn add @types/react @types/react-dom
```

Doing this will allow React-Rails to support the .tsx extension.

## Use with Asset Pipeline

Expand Down