Skip to content

Commit

Permalink
Rollback change on _ppx
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 25, 2024
1 parent ba36dc2 commit 52e585a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ppx/reason_react_ppx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,8 @@ let jsxMapper =
let expr = mapper#expression ctxt expr in
match expr.pexp_desc with
| Pexp_fun (Labelled "key", _, _, _) | Pexp_fun (Optional "key", _, _, _) ->
raise
(Invalid_argument
"Key cannot be accessed inside of a component. Don't worry - you \
can always key a component from its parent!")
Location.raise_errorf ~loc:expr.pexp_loc
("~key cannot be accessed from the component props. Please set the key where the component is being used.")
| Pexp_fun
( ((Optional label | Labelled label) as arg),
default,
Expand Down

0 comments on commit 52e585a

Please sign in to comment.