We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
文档中umi3升级到umi4中并没有提到history方法做了修改,导致以下行为完全不一致了。这应该是升级bug?为什么要修改呢?
// umi3 base 配置 /template history.createHref({ pathname: '/test' }); // 打印为 /template/test // 当前路径为/template/test时 history.location.pathname; // 打印为 /test
// umi4 base 配置 /template history.createHref({ pathname: '/test' }); // 打印为 /test // 当前路径为/template/test时 history.location.pathname; // 打印为 /template/test
The text was updated successfully, but these errors were encountered:
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。
Sorry, something went wrong.
参考 #10849 (comment) ,自行替换下使用的地方代码即可,目前 react router v6 的设计是全 hooks 式的,是大势所趋,应该尽早摆脱对 history 的依赖。
No branches or pull requests
文档中umi3升级到umi4中并没有提到history方法做了修改,导致以下行为完全不一致了。这应该是升级bug?为什么要修改呢?
// umi3 base 配置 /template
history.createHref({ pathname: '/test' }); // 打印为 /template/test
// 当前路径为/template/test时
history.location.pathname; // 打印为 /test
// umi4 base 配置 /template
history.createHref({ pathname: '/test' }); // 打印为 /test
// 当前路径为/template/test时
history.location.pathname; // 打印为 /template/test
Context
The text was updated successfully, but these errors were encountered: