Skip to content

react-jsx doesn't work well if an element has no props but only children. #40629

Description

@latin-1

TypeScript Version: 4.1.0-dev.20200918

Search Terms: react-jsx

Code

<div>text</div>

Expected behavior:

jsx_runtime_1.jsx("div", { children: "text" }, void 0)

Actual behavior:

jsx_runtime_1.jsx("div", {}, void 0)

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions