如何使用react-router从hash URL获取参数?

2024-03-04

使用react-router从HASH URL获取URL参数的任何方法。


您应该能够访问您的位置<Route>元件过孔this.props.location并将其传递给子组件,如v2.0.0 升级指南: https://github.com/ReactTraining/react-router/blob/v2.8.1/upgrade-guides/v2.0.0.md#accessing-location https://github.com/ReactTraining/react-router/blob/v2.8.1/upgrade-guides/v2.0.0.md#accessing-location

位置文档:
https://github.com/ReactTraining/react-router/blob/v2.8.1/docs/Glossary.md#location https://github.com/ReactTraining/react-router/blob/v2.8.1/docs/Glossary.md#location

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何使用react-router从hash URL获取参数? 的相关文章

随机推荐