Skip to content

Commit dd90512

Browse files
committed
React.act
1 parent 235bfd0 commit dd90512

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/React.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,7 @@ module Usable = {
441441
/** `use` is a React API that lets you read the value of a resource like a Promise or context. */
442442
@module("react")
443443
external use: Usable.t<'value> => 'value = "use"
444+
445+
/** `act` is a test helper to apply pending React updates before making assertions. */
446+
@module("react")
447+
external act: (unit => promise<unit>) => promise<unit> = "act"

0 commit comments

Comments
 (0)