如何使用 react-router 从 hash URL 获取参数?
How to get parameters from hash URL with react-router?
使用 react-router 从 HASH URL 中获取 URL 参数的任何方法。
您应该能够通过 this.props.location
访问 <Route>
组件中的位置,并将其传递给子组件,如 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/docs/Glossary.md#location
使用 react-router 从 HASH URL 中获取 URL 参数的任何方法。
您应该能够通过 this.props.location
访问 <Route>
组件中的位置,并将其传递给子组件,如 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/docs/Glossary.md#location