In react-admin get access to redux store

后端 未结 2 2023
长发绾君心
长发绾君心 2021-01-04 12:13

My question is related to react-admin repo.

I want to dispatch an action, outside of scope of a component, in order to do that, I\'ve read that I need to get access

2条回答
  •  没有蜡笔的小新
    2021-01-04 12:50

    You could also simply use custom reducers if the computation is no async

        // in src/App.js
    
        import React from 'react';
        import { Admin } from 'react-admin';
    
        import reducers from './reducers';
    
        const App = () => (
            
                ...
            
        );
    
        export default App;
    
    

提交回复
热议问题