如何从一个微观前端导航到另一个微观
我的团队已经开始为我们正在为之工作的公司编码一个新的平台,我们选择使用带有ReactJ的微型前端,这是我们以前从未遇到过的。
我们选择使用NX作为样板,以便我们可以轻松,更直观地创建项目。
我们不理解和找不到的一件事是,我们如何从一个微观前端到另一个微型前端导航。
例如:
我们有一个身份验证的微观前端项目,该项目负责登录 /注册操作,一旦用户完成该过程,他应该将其导航到另一个Micro Fe,即仪表板。
我们还找不到解决方法,因此目前我们正在使用当前代码来操纵整个窗口的位置。
window.location.replace(
$ {config()。baseurl} $ {apploutes.dashboard} );
有什么方法我们可以使用诸如history.push之类的东西(从React-Router-dom)还是任何等效的?
谢谢!
My team and have started to code a new platform for the company we're working for and we chose to use micro frontends with ReactJS, which is something we never messed with before.
We chose to use NX as a boilerplate so we can create the project easily and more intuitive.
One thing that we don't understand and couldn't find out yet is how can we navigate from within one micro frontend to another.
For example:
We have an authentication micro frontend project which responsible for the sign in / sign up operations, and once the user finish the process he should be navigated to another micro FE which is the dashboard.
We couldn't find out yet how to do it, so currently we're using the current code to manipulate the entire window's location.
window.location.replace(
${config().baseUrl}${AppRoutes.Dashboard});
Is there any way we can use anything like history.push (from react-router-dom) or anything equivalent?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论