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

问题描述 投票:0回答:1

这可能吗?我想使用一个<Admin显示其他导入的<Admin组件。我希望做这样的事情,其中​​MyTool是导入的<Admin组件:

    <Admin layout={MyLayout}
           dataProvider={myDataProvider}
           customRoutes={[
               <Route
                   exact
                   path="/tools"
                   component={(props) => <MyTool {...props} />}/>

           ]}>
    </Admin>
react-admin
1个回答
0
投票

[我确实尝试将每个<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

© www.soinside.com 2019 - 2024. All rights reserved.