我有这样的使用状态:
const [imgIdUploded, setImageIdUploaded] = useState<string | undefined>( undefined )
写什么类型?
export default function BuyTicketForm(props: { setImageIdUploaded?: ?????
fcg9iug31#
类型为Dispatch<SetStateAction<YOUR_TYPE>
Dispatch<SetStateAction<YOUR_TYPE>
import { Dispatch, SetStateAction } from "react"; export default function BuyTicketForm(props: { setImageIdUploaded?: Dispatch<SetStateAction<string | undefined>>
1条答案
按热度按时间fcg9iug31#
类型为
Dispatch<SetStateAction<YOUR_TYPE>