File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -413,3 +413,15 @@ type transitionStartFunction = transitionFunction => unit
413
413
/** `useTransition` is a React Hook that lets you render a part of the UI in the background. */
414
414
@module ("react" )
415
415
external useTransition : unit => (bool , transitionStartFunction ) = "useTransition"
416
+
417
+ type action <'state , 'payload > = ('state , 'payload ) => promise <'state >
418
+
419
+ type formAction <'formData > = 'formData => promise <unit >
420
+
421
+ /** `useActionState` is a Hook that allows you to update state based on the result of a form action. */
422
+ @module ("react" )
423
+ external useActionState : (
424
+ action <'state , 'payload >,
425
+ 'state ,
426
+ ~permalink : string = ?,
427
+ ) => ('state , formAction <'payload >, bool ) = "useActionState"
You can’t perform that action at this time.
0 commit comments