Skip to content

Commit fd45956

Browse files
committed
refactor: apply renderInternal to renderHook
1 parent dcc1295 commit fd45956

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/renderHook.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import type { ComponentType } from 'react';
3-
import render from './render';
3+
import { renderInternal } from './render';
44

55
export type RenderHookResult<Result, Props> = {
66
rerender: (props: Props) => void;
@@ -36,10 +36,13 @@ export function renderHook<Result, Props>(
3636
return null;
3737
}
3838

39-
const { rerender: baseRerender, unmount } = render(
39+
const { rerender: baseRerender, unmount } = renderInternal(
4040
// @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt
4141
<TestComponent renderCallbackProps={initialProps} />,
42-
{ wrapper, skipHostComponentNamesConfiguration: true }
42+
{
43+
wrapper,
44+
detectHostComponentNames: false,
45+
}
4346
);
4447

4548
function rerender(rerenderCallbackProps: Props) {

0 commit comments

Comments
 (0)