Skip to content

@gtkx/testing / RenderHookResult

Type Alias: RenderHookResult<Result, Props>

RenderHookResult<Result, Props> = object

Defined in: types.ts:203

Result returned by renderHook.

Provides access to the hook result and utilities for re-rendering and cleanup.

Type Parameters

Type Parameter
Result
Props

Properties

rerender

rerender: (newProps?) => Promise<void>

Defined in: types.ts:207

Re-render the hook with optional new props

Parameters

ParameterType
newProps?Props

Returns

Promise<void>


result

result: object

Defined in: types.ts:205

Object containing the current hook return value

current

current: Result


unmount

unmount: () => Promise<void>

Defined in: types.ts:209

Unmount the component containing the hook

Returns

Promise<void>