We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10d9a28 commit a334f80Copy full SHA for a334f80
src/pure.tsx
@@ -73,9 +73,14 @@ function resultContainer<TValue>() {
73
}
74
75
76
+export interface RenderHookOptions<TProps> {
77
+ initialProps?: TProps
78
+ wrapper?: React.ComponentType<TProps>
79
+}
80
+
81
function renderHook<TProps, TResult>(
82
callback: (props: TProps) => TResult,
- { initialProps, wrapper }: { initialProps?: TProps; wrapper?: React.ComponentType<TProps> } = {}
83
+ { initialProps, wrapper }: RenderHookOptions<TProps> = {}
84
) {
85
const { result, setValue, setError, addResolver } = resultContainer<TResult>()
86
const hookProps = { current: initialProps }
0 commit comments