Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react fragment cannot use in mdx #1334

Closed
toy-crane opened this issue Dec 4, 2020 · 2 comments
Closed

react fragment cannot use in mdx #1334

toy-crane opened this issue Dec 4, 2020 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed types

Comments

@toy-crane
Copy link

toy-crane commented Dec 4, 2020

Describe the bug
i`m using typescript with theme UI
MDX seems to does not recognize react fragment <></>

To Reproduce
use fragment tag <></> in mdx component

Expected behavior
mdx return @jsxFrag pragma is required when using an @jsx pragma with JSX fragments.ts(17017)

Screenshots
Screen Shot 2020-12-05 at 12 58 36 AM

Additional context
work around solution is that using React.fragment
is there another way to fix it?

@hasparus
Copy link
Member

hasparus commented Dec 4, 2020

Thanks for the issue, @toy-crane!

I'm not sure yet if this is in this codebase our upstream.

This PR looks relevant mdx-js/mdx#1014 (comment)

@hasparus hasparus added the bug Something isn't working label Dec 4, 2020
@hasparus hasparus assigned hasparus and unassigned hasparus Dec 4, 2020
@lachlanjc lachlanjc added the help wanted Extra attention is needed label Oct 27, 2021
@lachlanjc
Copy link
Member

Screen Shot 2022-01-29 at 11 45 24 AM

I'm not able to reproduce this issue at this point, so closing for now. If you're still running into it, please fork my CodeSandbox with a repro: https://codesandbox.io/s/next-theme-ui-example-forked-gxcd0?file=/components/about.mdx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed types
Projects
None yet
Development

No branches or pull requests

3 participants