Skip to content

Commit 6bfb9b9

Browse files
Update misc_docs/syntax/decorator_react_component.mdx
Co-authored-by: Patrick Ecker <ryyppy@users.noreply.github.com>
1 parent 90225a6 commit 6bfb9b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

misc_docs/syntax/decorator_react_component.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ category: "decorators"
88

99
The `@react.component` decorator is used to annotate functions that are [ReasonReact](https://reasonml.github.io/reason-react/en/) components.
1010

11+
You will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.
12+
13+
**Note:** The `@react.component` decorator requires the [react-jsx config](/docs/manual/latest/build-configuration#reason-refmt-old) to be set in your `bsconfig.json` to enable the required React transformations.
14+
1115
### Example
1216

1317
<CodeTab labels={["ReScript", "JS Output"]}>
@@ -34,4 +38,4 @@ var make = MyComponent;
3438

3539
### References
3640

37-
* [ReasonReact Components](https://reasonml.github.io/reason-react/docs/en/components)
41+
* [ReasonReact Components](https://reasonml.github.io/reason-react/docs/en/components)

0 commit comments

Comments
 (0)