We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f31864 commit c99aae2Copy full SHA for c99aae2
compiler/syntax/src/jsx_v4.ml
@@ -1294,7 +1294,12 @@ let transform_structure_item ~config item =
1294
| _, [_] ->
1295
Jsx_common.raise_error ~loc:pstr_loc
1296
"Components cannot be defined as externals when using \
1297
- @react.componentWithProps. Please use @react.component instead."
+ @react.componentWithProps.\n\n\
1298
+ If you intended to define an external for a React component using a \
1299
+ props type,\n\
1300
+ use the type React.component<props> instead.\n\
1301
+ Alternatively, use @react.component for an external definition with \
1302
+ labeled arguments."
1303
| [_], [] ->
1304
check_multiple_components ~config ~loc:pstr_loc;
1305
check_string_int_attribute_iter.structure_item
0 commit comments