Bug Report
🔎 Search Terms
React Fragment
🕗 Version & Regression Information
I believe this is a new inconsistency due to changes in React.
⏯ Playground Link
https://github.com/gkemp94/test-typescript-fragment
Code
import React from "react";
const test = () => "asd";
// No Errors
const jsxWithJsxFragment = <>{test}</>;
// Type '() => string' is not assignable to type 'ReactNode'.
const jsxWithReactFragment = <React.Fragment>{test}</React.Fragment>;
🙁 Actual behavior
When using <> vs <React.Fragment> the children are not properly type checked
🙂 Expected behavior
When jsx: react is specified, to type check <> the same as React.Fragment
Bug Report
🔎 Search Terms
React Fragment
🕗 Version & Regression Information
I believe this is a new inconsistency due to changes in React.
⏯ Playground Link
https://github.com/gkemp94/test-typescript-fragment
Code
🙁 Actual behavior
When using
<>vs<React.Fragment>the children are not properly type checked🙂 Expected behavior
When jsx: react is specified, to type check
<>the same asReact.Fragment