Skip to content

Commit

Permalink
Turn useState initializer as a uncurried fn
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 19, 2024
1 parent 4434bfd commit acfeac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ type callbackAsync('input, 'output) = 'input => Js.Promise.t('output);
*/
[@mel.module "react"]
external useState:
([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) =
(unit => 'state) => ('state, (. ('state => 'state)) => unit) =
"useState";

[@mel.module "react"]
Expand Down
2 changes: 1 addition & 1 deletion src/React.rei
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ module Suspense: {
*/
[@mel.module "react"]
external useState:
([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) =
(unit => 'state) => ('state, (. ('state => 'state)) => unit) =
"useState";

[@mel.module "react"]
Expand Down

0 comments on commit acfeac2

Please sign in to comment.