From 3c60f9b6daa0d3aad4b2e9666b7c12f8552cc74d Mon Sep 17 00:00:00 2001 From: Ivan Porollo Date: Wed, 14 Feb 2018 23:58:01 -0500 Subject: [PATCH] [ci skip] :memo: Add Typescript integration details --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6d01fed28..941324cef 100644 --- a/README.md +++ b/README.md @@ -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