Skip to content

Commit e34a038

Browse files
committed
Turn useState initializer as a uncurried fn
1 parent 4434bfd commit e34a038

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/React.re

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ type callbackAsync('input, 'output) = 'input => Js.Promise.t('output);
479479
*/
480480
[@mel.module "react"]
481481
external useState:
482-
([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) =
482+
([@mel.uncurry] (unit => 'state)) =>
483+
('state, (. ('state => 'state)) => unit) =
483484
"useState";
484485

485486
[@mel.module "react"]

src/React.rei

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ module Suspense: {
167167
*/
168168
[@mel.module "react"]
169169
external useState:
170-
([@mel.uncurry] (unit => 'state)) => ('state, ('state => 'state) => unit) =
170+
([@mel.uncurry] (unit => 'state)) =>
171+
('state, (. ('state => 'state)) => unit) =
171172
"useState";
172173

173174
[@mel.module "react"]

0 commit comments

Comments
 (0)