diff --git a/src/React.re b/src/React.re index 33d1c345..cb2ef44f 100644 --- a/src/React.re +++ b/src/React.re @@ -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"; diff --git a/src/React.rei b/src/React.rei index 7f2f9127..d939f38d 100644 --- a/src/React.rei +++ b/src/React.rei @@ -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";