Skip to content

Commit 16536e1

Browse files
committed
.
1 parent 5921807 commit 16536e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/render-hook.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function renderHook<Result, Props>(
3737
): Promise<RenderHookResult<Result, Props>> {
3838
const result = React.createRef<Result>() as RefObject<Result>;
3939

40-
function TestComponent({ hookProps }: { hookProps: Props }) {
40+
function HookContainer({ hookProps }: { hookProps: Props }) {
4141
const renderResult = hookToRender(hookProps);
4242
React.useEffect(() => {
4343
result.current = renderResult;
@@ -49,13 +49,13 @@ export async function renderHook<Result, Props>(
4949
const { initialProps, ...renderOptions } = options ?? {};
5050
const { rerenderAsync: rerenderComponentAsync, unmountAsync } = await renderAsync(
5151
// @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt
52-
<TestComponent hookProps={initialProps} />,
52+
<HookContainer hookProps={initialProps} />,
5353
renderOptions,
5454
);
5555

5656
return {
5757
result: result,
58-
rerender: (hookProps: Props) => rerenderComponentAsync(<TestComponent hookProps={hookProps} />),
58+
rerender: (hookProps: Props) => rerenderComponentAsync(<HookContainer hookProps={hookProps} />),
5959
unmount: unmountAsync,
6060
};
6161
}

0 commit comments

Comments
 (0)