From b9ca7d450e614eeee7eb0d458eacd2c6bcb5978a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20=C3=98stergaard?= Date: Tue, 25 Feb 2020 10:56:49 +0100 Subject: [PATCH] Expand Typescript support section Recommend setting the `server_renderer_extensions` config option. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85749f26d..9b8db0b25 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,10 @@ $ bundle exec rails webpacker:install:typescript $ yarn add @types/react @types/react-dom ``` -Doing this will allow React-Rails to support the .tsx extension. +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: +``` +config.react.server_renderer_extensions = ["jsx", "js", "tsx", "ts"] +``` ### Test component