React Router V6尝试将网页链接在一起时显示空白网页
我正在尝试遵循YouTube上React UI的Lamadevs Basic Bluat博客教程。在视频的最后一部分中,我无法将我的网页链接到app.js中,因为他使用版本5而不是6版。我尝试将开关切换到路由,但也无法使用。我是否必须下载旧的React Router Router Dom V5才能正常工作?现在,它导致一个空白的网页。
I am trying to follow lamadevs Basic blog tutorial for the UI in React on youtube. In the last section of the video I am unable to link my webpages together in App.js because he uses version 5 instead of 6. I tried switching the switch to route instead but it also didnt work. Do I have to download the old react router dom v5 for it to work? Right now it results in a blank Webpage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以应该这样:
区别在于,现在您不编写组件,但是元素和元素是JSX,而不是组件函数本身。尝试一下,它应该起作用。
So it should be like this:
The difference is, now you don't write a component, but element and element is a JSX, and not component function itself. Try this, it should work.