Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52dcc43

Browse files
fix: avoid relying on implicit children prop
1 parent efd262c commit 52dcc43

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/types/react.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComponentType } from 'react'
1+
import { ComponentType,ReactNode } from 'react'
22

33
import {
44
RenderHookOptions as BaseRenderHookOptions,
@@ -8,7 +8,9 @@ import {
88
CleanupCallback
99
} from '.'
1010

11-
export type WrapperComponent<TProps> = ComponentType<TProps>
11+
export type WrapperComponent<TProps> = ComponentType<TProps & {
12+
children?: ReactNode
13+
}>
1214

1315
export type RendererOptions<TProps> = {
1416
wrapper?: WrapperComponent<TProps>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /