Skip to content

Commit

Permalink
feat(react): add isValidElement (#837)
Browse files Browse the repository at this point in the history
r17x authored Jul 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7b0562a commit 88a4fde
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
@@ -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";

3 changes: 3 additions & 0 deletions src/React.rei
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 88a4fde

Please sign in to comment.