方法一
function ListItem({ children }: any) {
return <div>ListItem, {children}</div>
}
方法二
const ListItem = ({ children }: any) => {
return <div>ListItem, {children}</div>
}
或者使用 FC 修正
import React, { FC } from 'react'
const ListItem: FC<any> = ({ children }) => {
return <div>ListItem, {children}</div>
}