Skip to content

Support <> standalone fragment syntax #84

Description

@smrq

This syntax (or similar) has been brought up in a number of comments across various issues already, but as far as I can tell has no standalone proposal.

The syntax is:

<>
  <Child />
  <Child />
  <Child />
</>

This is equivalent to an array, except that because the structure of the array is statically known, keys could be automatically assigned to each child.

I think a lot of people may mistakenly think React 16.x can already do this as a result of the new feature to return multiple components from render. I suspect the lack of this syntax might become even more of a pain point with that release.

(Correct me if I'm wrong or should clarify anything further. I'm just making the issue because it seems there should have been one already.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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