如何将一个 React-Admin 组件嵌入另一个;多个管理组件

How to embed one React-Admin component inside another; multiple Admin components

这可能吗? 我想使用一个 <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