Skip to content

Commit

Permalink
feat(react): add isValidElement (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x authored Jul 17, 2024
1 parent 7b0562a commit 88a4fde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ external component: componentLike('props, element) => component('props) =
external createElement: (component('props), 'props) => element =
"createElement";

[@mel.module "react"]
external isValidElement: element => bool = "isValidElement";

[@mel.module "react"]
external cloneElement: (element, 'props) => element = "cloneElement";

Expand Down
3 changes: 3 additions & 0 deletions src/React.rei
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ external component: componentLike('props, element) => component('props) =
external createElement: (component('props), 'props) => element =
"createElement";

[@mel.module "react"]
external isValidElement: element => bool = "isValidElement";

[@mel.module "react"]
external cloneElement: (element, 'props) => element = "cloneElement";

Expand Down

0 comments on commit 88a4fde

Please sign in to comment.