Skip to content

JSX sugar for object as props #944

@syranide

Description

@syranide

Hopefully we'll get JSX namespacing soon for accessing components inside objects (#760). Then, technically, there is only one thing that JSX cannot do that vanilla JS can, using an object as props MyComp(myObject).

JSX is beautiful that's why I love it, MyComp(myObject, <Child />) is not, I would much rather do <MyComp {myObject}><Child /></MyComp> or whatever syntax you prefer. To be clear, I'm specifically and only talking about supporting an object, no additional properties.

It's still just sugar, but with this feature JSX is capable enough to do everything JS can, while still looking familiar and being more readable than its JS counterpart.

As I've mentioned before, I could take it upon me to implement this myself, it should be a relatively simple change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions