diff --git a/src/React.re b/src/React.re index ae8cd326e..fc8fe9319 100644 --- a/src/React.re +++ b/src/React.re @@ -905,7 +905,7 @@ module Experimental = { /* https://react.dev/reference/react/useOptimistic */ [@mel.module "react"] external useOptimistic: - ('state, ('state, 'optimisticValue) => 'state) => + ('state, [@mel.uncurry] (('state, 'optimisticValue) => 'state)) => ('state, 'optimisticValue => unit) = "useOptimistic"; @@ -959,7 +959,12 @@ module Experimental = { /* https://react.dev/reference/react/useActionState */ [@mel.module "react"] external useActionState: - (('state, FormData.t) => unit, 'state, ~permalink: bool=?) => + ( + [@mel.uncurry] (('state, FormData.t) => unit), + 'state, + ~permalink: bool=?, + unit + ) => ('state, formAction, bool) = "useActionState"; }; diff --git a/src/React.rei b/src/React.rei index 66b4de0ee..8a83eebe1 100644 --- a/src/React.rei +++ b/src/React.rei @@ -586,7 +586,7 @@ module Experimental: { [@mel.module "react"] external useOptimistic: - ('state, ('state, 'optimisticValue) => 'state) => + ('state, [@mel.uncurry] (('state, 'optimisticValue) => 'state)) => ('state, 'optimisticValue => unit) = "useOptimistic"; @@ -644,7 +644,12 @@ module Experimental: { [@mel.module "react"] external useActionState: - (('state, FormData.t) => unit, 'state, ~permalink: bool=?) => + ( + [@mel.uncurry] (('state, FormData.t) => unit), + 'state, + ~permalink: bool=?, + unit + ) => ('state, formAction, bool) = "useActionState"; };