reactjs - 反应路由问题重定向
问题描述
如何使用 onload 获取哈希位置
<Redirect exact from="/:id" to="/user/1231231"/>
<Route path="/user/:id" exact component={UserComponent}/>
解决方案
我不知道您使用的是什么版本的软件包。但这里是基本的例子。试着去?profile=:id
推荐阅读
- ruby - How to create
... node in Nokogiri? - android-studio - 如何将我的 Flutter 项目从 vscode 迁移到 Android Studio?
- javascript - 尝试使用 expressJS 重定向时“被 CORS 策略阻止”
- android - 具有 DataBinding 和 R8 的 Android 动态功能
- android - Spinner 在自定义对话框中不显示任何文本
- laravel - Laravel standard role on user registering
- python - AttributeError:“Alpr”对象没有“已加载”属性
- amazon-redshift - 我们可以结合 Tableau Extract 和实时数据吗?
- postgresql - 当异常引发回滚插入
- c# - 在c#中从RabbitMQ中的队列中获取所有消息