diff --git a/src/React.re b/src/React.re index cb2ef44f7..e8c9c7fc4 100644 --- a/src/React.re +++ b/src/React.re @@ -872,10 +872,15 @@ module Uncurried = { "useCallback"; }; +type callback('input, 'output) = 'input => 'output; + [@mel.module "react"] external useTransition: unit => (bool, callback(callback(unit, unit), unit)) = "useTransition"; +[@mel.module "react"] +external startTransition: ([@mel.uncurry] (unit => unit)) => unit = "startTransition"; + [@mel.module "react"] external useDebugValue: ('value, ~format: 'value => string=?, unit) => unit = "useDebugValue"; diff --git a/src/React.rei b/src/React.rei index d939f38d7..c7664b2ba 100644 --- a/src/React.rei +++ b/src/React.rei @@ -564,6 +564,9 @@ module Uncurried: { "useCallback"; }; +[@mel.module "react"] +external startTransition: ([@mel.uncurry] (unit => unit)) => unit = "startTransition"; + [@mel.module "react"] external useTransition: unit => (bool, callback(callback(unit, unit), unit)) = "useTransition";