Skip to content

Commit d89946d

Browse files
faheempatelcknitt
andauthored
Add binding for React.isValidElement (#40)
* Add binding for React.isValidElement * Just use 'a instead of Js.nullable<'a> Co-authored-by: Christoph Knittel <ck@cca.io>
1 parent 49c4a9b commit d89946d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/React.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ let createElementWithKey = (component, props, key) =>
2929
@module("react")
3030
external cloneElement: (element, 'props) => element = "cloneElement"
3131

32+
@module("react")
33+
external isValidElement: 'a => bool = "isValidElement"
34+
3235
@variadic @module("react")
3336
external createElementVariadic: (component<'props>, 'props, array<element>) => element =
3437
"createElement"

0 commit comments

Comments
 (0)