Skip to content

API Reference / @gtkx/testing / act

Variable: act

const act: ActImplementation

Defined in: act.d.ts:16

Runs a callback inside React's act environment, flushing pending state updates and effects, and resolves once the work has settled.

Param

callback

Work to run within the act environment.

Returns

A promise that resolves with the callback's result after updates flush.

Released under the MPL-2.0 License.