Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 9ec5f16

Browse files
committed
spec: react fragment
1 parent 9bba115 commit 9ec5f16

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cli/JSXV4.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,21 @@ Since an external is a function declaration, it follows the same rule.
8888

8989
Use the V3 convention for names, and make sure the generated
9090
function has the name of the enclosing module/file.
91+
92+
**Fragment**
93+
94+
```rescript
95+
@react.component
96+
let make = () => <> component </>
97+
98+
// is converted to
99+
100+
let make = () => {
101+
ReactDOMRe.createElement(
102+
ReasonReact.fragment,
103+
[
104+
component
105+
]
106+
)
107+
}
108+
```

0 commit comments

Comments
 (0)