Title: JSX Fragments are in-properly typed when not using `React.Fragment` · Issue #50429 · microsoft/TypeScript · GitHub
Open Graph Title: JSX Fragments are in-properly typed when not using `React.Fragment` · Issue #50429 · microsoft/TypeScript
X Title: JSX Fragments are in-properly typed when not using `React.Fragment` · Issue #50429 · microsoft/TypeScript
Description: 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 "reac...
Open Graph Description: 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-typescri...
X Description: 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-type...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/50429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JSX Fragments are in-properly typed when not using `React.Fragment`","articleBody":"# Bug Report\r\n\r\n### 🔎 Search Terms\r\n\r\nReact Fragment\r\n\r\n### 🕗 Version & Regression Information\r\n \r\nI believe this is a new inconsistency due to changes in React.\r\n\r\n### ⏯ Playground Link\r\n\r\nhttps://github.com/gkemp94/test-typescript-fragment\r\n\r\n### Code\r\n```\r\nimport React from \"react\";\r\n\r\nconst test = () => \"asd\";\r\n\r\n// No Errors\r\nconst jsxWithJsxFragment = \u003c>{test}\u003c/>;\r\n\r\n// Type '() => string' is not assignable to type 'ReactNode'.\r\nconst jsxWithReactFragment = \u003cReact.Fragment>{test}\u003c/React.Fragment>;\r\n\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nWhen using `\u003c>` vs `\u003cReact.Fragment>` the children are not properly type checked\r\n\r\n### 🙂 Expected behavior\r\n\r\nWhen jsx: react is specified, to type check `\u003c>` the same as `React.Fragment`\r\n","author":{"url":"https://github.com/gkemp94","@type":"Person","name":"gkemp94"},"datePublished":"2022-08-24T17:20:42Z","url":"https://github.com/microsoft/TypeScript/issues/50429"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ae208d6d-4010-c423-109d-90c3eda2670b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5B4:3A347:BAEF4D:F9389A:6B00F247 |
| html-safe-nonce | 7476d93082147ab6fd8a5a4d940613e993932127f8e0a5db5ee665b84add2952 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUI0OjNBMzQ3OkJBRUY0RDpGOTM4OUE6NkIwMEYyNDciLCJ2aXNpdG9yX2lkIjoiNzAxNzYwODM2MDIwNzkwNTM1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 186c7c69c86462fa888d32144fd90ae0a4d931254c2e347b79daf89579737878 |
| hovercard-subject-tag | issue:1349786901 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/50429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/605d4c9c97a431c5d3bb556400f1ab22d231a42fa3fe5e9949b77ac1fdb4de21/microsoft/TypeScript/issues/50429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/605d4c9c97a431c5d3bb556400f1ab22d231a42fa3fe5e9949b77ac1fdb4de21/microsoft/TypeScript/issues/50429 |
| og:image:alt | 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-typescri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gkemp94 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width