Skip to content

Commit 6bdaa93

Browse files
committed
rescript-react 0.14.0 release
1 parent 13a88ed commit 6bdaa93

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

tests/dependencies/rescript-react/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@rescript/react",
3-
"version": "0.14.0-rc.1",
3+
"version": "0.14.0",
44
"private": true,
5+
"description": "React bindings for ReScript",
56
"dependencies": {
67
"rescript": "workspace:^"
78
}

tests/dependencies/rescript-react/src/React.res

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,23 @@ external displayName: component<'props> => option<string> = "displayName"
411411

412412
// Actions
413413

414-
type transitionFunction = unit => promise<unit>
415-
414+
type transitionFunction = unit => unit
416415
type transitionStartFunction = transitionFunction => unit
417416

417+
type transitionFunctionAsync = unit => promise<unit>
418+
type transitionStartFunctionAsync = transitionFunctionAsync => unit
419+
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+
418426
/** `useTransition` is a React Hook that lets you render a part of the UI in the background. */
419427
@module("react")
420428
external useTransition: unit => (bool, transitionStartFunction) = "useTransition"
429+
@module("react")
430+
external useTransitionAsync: unit => (bool, transitionStartFunctionAsync) = "useTransition"
421431

422432
type action<'state, 'payload> = ('state, 'payload) => promise<'state>
423433

0 commit comments

Comments
 (0)