Skip to content

Commit c93f6ee

Browse files
authored
Merge pull request #1054 from ostrgard/patch-1
Typescript support section: mention server_renderer_extensions
2 parents 21cbb89 + b9ca7d4 commit c93f6ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ $ bundle exec rails webpacker:install:typescript
178178
$ yarn add @types/react @types/react-dom
179179
```
180180

181-
Doing this will allow React-Rails to support the .tsx extension.
181+
Doing this will allow React-Rails to support the .tsx extension. Additionally, it is recommended to add `ts` and `tsx` to the `server_renderer_extensions` in your application configuration:
182+
```
183+
config.react.server_renderer_extensions = ["jsx", "js", "tsx", "ts"]
184+
```
182185

183186
### Test component
184187

0 commit comments

Comments
 (0)