react router useSearchParamsuseSearchParams | React Router它提供了内建的 API,允许直接获取查询参数的值,比如 .get(), .set(), .append() 等。qs + window.locationGitHub - ljharb/qs: A querystring parser with nesting support使用window.location.search获取到请求参数对应的字符串(需要注意的是:字符串是带有?的)然后使用qs.parse方法来解析查询字符串案例:localhost?medicalRecordID=1错误使用:正确使用:上一篇最近状态比较差下一篇使用cursor生成git commit msg下一篇使用cursor生成git commit msg