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

JSX empty type field for those functional components starting with uppercase letter #14797

Open
7flash opened this issue Oct 24, 2024 · 1 comment
Labels
bug Something isn't working transpiler parser || printer

Comments

@7flash
Copy link

7flash commented Oct 24, 2024

What version of Bun is running?

1.1.33

What platform is your computer?

macos

What steps can reproduce the bug?

function First() => <h1>second</h1>
const element = <First/>
console.log(JSON.stringify(element, null, 2)) // type field is missing

however, if you change to lowercase component name, then it all works as expected

const element = <first/>
console.log(element.type) // first

i understand, this might be expected behavior due to difference, where in second case is handled as a native tag. but then I'm still confused, how do I properly define my named components with children, without defining my own runtime/jsx ?

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

@7flash 7flash added bug Something isn't working needs triage labels Oct 24, 2024
@nektro nektro added transpiler parser || printer and removed needs triage labels Oct 24, 2024
@EliLichtblau
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transpiler parser || printer
Projects
None yet
Development

No branches or pull requests

3 participants