Skip to content

Commit a9c7bb1

Browse files
Add startTransition
1 parent f49a463 commit a9c7bb1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/React.res

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ type transitionStartFunction = transitionFunction => unit
417417
type transitionFunctionAsync = unit => promise<unit>
418418
type transitionStartFunctionAsync = transitionFunctionAsync => unit
419419

420+
/** `startTransition` lets you render a part of the UI in the background. */
421+
@module("react")
422+
external startTransition: transitionStartFunction = "startTransition"
423+
@module("react")
424+
external startTransitionAsync: transitionStartFunctionAsync = "startTransition"
425+
420426
/** `useTransition` is a React Hook that lets you render a part of the UI in the background. */
421427
@module("react")
422428
external useTransition: unit => (bool, transitionStartFunction) = "useTransition"

0 commit comments

Comments
 (0)