You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: misc_docs/syntax/decorator_react_component.mdx
+5-1
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ category: "decorators"
8
8
9
9
The `@react.component` decorator is used to annotate functions that are [ReasonReact](https://reasonml.github.io/reason-react/en/) components.
10
10
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.
0 commit comments