route : "path": "/business/:id?/:test"
如何 获取id 跟test的参数值
match.params.id 和 match.params.test,参考 https://reacttraining.com/react-router/web/example/url-params
match 和computedMatch差别是啥呢?
match 和computedMatch差别是啥呢?
@lehug computedMatch 其实是个内部属性,在 Switch 和 Route 之间用到,公开的 API 参数要用 match。
computedMatch会触发开发版本 React 的unknown prop⚠️。
Most helpful comment
match.params.id和match.params.test,参考 https://reacttraining.com/react-router/web/example/url-params