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

Commit 19d9698

Browse files
committed
Tweak message for one component per module.
1 parent b655806 commit 19d9698

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cli/reactjs_jsx_ppx.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,13 +1513,14 @@ module V4 = struct
15131513
let raiseError ~loc msg = Location.raise_errorf ~loc msg
15141514

15151515
let raiseErrorMultipleReactComponent ~loc =
1516-
raiseError ~loc "Each module should have one react component at most"
1517-
1516+
raiseError ~loc
1517+
"Only one component definition is allowed for each module. Move to a \
1518+
submodule or other file if necessary."
15181519
(*
15191520
AST node builders
15201521
These functions help us build AST nodes that are needed when transforming a [@react.component] into a
15211522
constructor and a props external
1522-
*)
1523+
*)
15231524

15241525
(* make record from props and spread props if exists *)
15251526
let recordFromProps ?(removeKey = false) callArguments =

0 commit comments

Comments
 (0)