File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -411,14 +411,22 @@ external displayName: component<'props> => option<string> = "displayName"
411411
412412// Actions
413413
414- type transitionFunction = unit => promise < unit >
414+ type transitionFunction = unit => unit
415415
416416type transitionStartFunction = transitionFunction => unit
417417
418418/** `useTransition` is a React Hook that lets you render a part of the UI in the background. */
419419@module ("react" )
420420external useTransition : unit => (bool , transitionStartFunction ) = "useTransition"
421421
422+ type transitionAsyncFunction = unit => promise <unit >
423+
424+ type transitionAsyncStartFunction = transitionAsyncFunction => unit
425+
426+ /** `useTransitionAsync` is a React Hook that lets you render a part of the UI in the background. */
427+ @module ("react" )
428+ external useTransitionAsync : unit => (bool , transitionAsyncStartFunction ) = "useTransition"
429+
422430type action <'state , 'payload > = ('state , 'payload ) => promise <'state >
423431
424432type formAction <'formData > = 'formData => promise <unit >
You can’t perform that action at this time.
0 commit comments