这可能吗?我想使用一个<Admin
显示其他导入的<Admin
组件。我希望做这样的事情,其中MyTool
是导入的<Admin
组件:
<Admin layout={MyLayout}
dataProvider={myDataProvider}
customRoutes={[
<Route
exact
path="/tools"
component={(props) => <MyTool {...props} />}/>
]}>
</Admin>
[我确实尝试将每个<Admin
包装到我自己的提供程序中都没有成功,所以我认为Francois Z.答案是确定的。
react-admin maintainer here: this has never been a requirement of react-admin, and I've never tested it. It probably won't work, and I personally think it's a bad idea. – François Zaninotto 5 hours ago