diff --git a/src/React.re b/src/React.re index ba02b4222..e17931519 100644 --- a/src/React.re +++ b/src/React.re @@ -479,7 +479,8 @@ type callbackAsync('input, 'output) = 'input => Js.Promise.t('output); */ [@mel.module "react"] external useState: - ([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) = + ([@mel.uncurry] (unit => 'state)) => + ('state, (. ('state => 'state)) => unit) = "useState"; [@mel.module "react"] diff --git a/src/React.rei b/src/React.rei index 372337618..2fac4bd03 100644 --- a/src/React.rei +++ b/src/React.rei @@ -167,7 +167,8 @@ module Suspense: { */ [@mel.module "react"] external useState: - ([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) = + ([@mel.uncurry] (unit => 'state)) => + ('state, (. ('state => 'state)) => unit) = "useState"; [@mel.module "react"]