import { ReactNode, FC } from 'react' type Props = { children: ReactNode } const App: FC<Props> = ({children}) => (<div>{children}</div>)
React TypeScript children 类型
6 min read
import { ReactNode, FC } from 'react' type Props = { children: ReactNode } const App: FC<Props> = ({children}) => (<div>{children}</div>)