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
嵌套路由时 layout里获取不到children,请问是什么原因
// config/routes.ts export default [ { path: '/', component: '../layout/index', routes: [ { path: '/setting', component: './Setting/index', name: 'setting' }, ], }, ]; // src/layout/index.tsx const Layout = (props) => { console.log(props); // {} return props.children }; export default Layout;
此时打印 props 是空对象
The text was updated successfully, but these errors were encountered:
哦,react rotuer更新了,要用<Outlet />了
<Outlet />
Sorry, something went wrong.
No branches or pull requests
🧐 问题描述 | Problem description
嵌套路由时 layout里获取不到children,请问是什么原因
💻 示例代码 | Sample code
此时打印 props 是空对象
The text was updated successfully, but these errors were encountered: