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 55f63ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ type callbackAsync('input, 'output) = 'input => Js.Promise.t('output);
* them differently. Lazy initializer + callback which returns state is the
* only way to safely have any type of state and be able to update it correctly.
*/
[@mel.module "react"]
[@mel.module "react"] [@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 55f63ba

Please sign in to comment.