📌  相关文章
📜  typeerror object(...) is not a function react useParams - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.834000             🧑  作者: Mango

代码示例1
There is no useParams in the react library?
perhaps like me , you were using the wrong import.
i expect you use react-router? then you should import the useParams from there.
import { useParams } from "react"  (wrong)
import React from "react";
import { useParams } from "react-router-dom";(right)