Skip to content

API Reference / @gtkx/testing / act

Variable: act ​

const act: ActImplementation

Defined in: packages/testing/src/act.ts:20

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.