我在页面/用户/文件夹中创建了一堆文件。我可以通过以下 URL 访问它们:
http://localhost:3000/user/signup
http://localhost:3000/user/signin
http://localhost:3000/user/profile
Run Code Online (Sandbox Code Playgroud)
我想做的是删除用户/部分,以便 URL 如下所示:
http://localhost:3000/signup
http://localhost:3000/signin
http://localhost:3000/profile
Run Code Online (Sandbox Code Playgroud)
稍后我将在页面内添加更多文件夹以用于帖子等。实现此目的的最佳方法是什么?
当我尝试使用 Router.push() 重定向时,出现以下错误:
TypeError: next_router__WEBPACK_IMPORTED_MODULE_3__.Router.push is not a function
Run Code Online (Sandbox Code Playgroud)
我正在尝试从 create-react-app 迁移到下一个 js。
const redirectUser = () => {
if (true) {
Router.push('/');
}
};
Run Code Online (Sandbox Code Playgroud) 嗨,我建立了Udemy API,该API使用React和axios获取课程。如果chrome启用了CORS扩展名,则可以正常工作,但否则不会获取数据。
我已经问过有关此问题的问题,请花点时间阅读。我已经尝试了在线提供的所有解决方案。