From e399bfdb26119e42e3bfc52c4c0b5d430ee21f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=A4nisch?= Date: Fri, 5 Mar 2021 11:47:04 +0100 Subject: [PATCH] improve: add jsx fragment factory Without the fragment factory you can't use the `<> ... ` as a fragment shorthand. If it's set to `Fragment` instead of `h.Fragment`, you'd have to manually import `Fragment` or otherwise you'd get a "Cannot find name 'Fragment'." error. With `h.Fragment`, `<> ... ` just works. Thanks @WickyNilliams for the hint! --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 09367ce..96fdcf4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "noUnusedLocals": true, "noUnusedParameters": true, "jsx": "react", - "jsxFactory": "h" + "jsxFactory": "h", + "jsxFragmentFactory": "h.Fragment" }, "include": [ "src"