dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.28k stars 2.2k forks source link

Reuse action creator in other Fractal route container #1333

Open neerajincaendo opened 7 years ago

neerajincaendo commented 7 years ago

Hello, how can reuse reducer actions of one Fractal route into another Fractal route container.

import { fetchExpertProfile} from '../modules/dashboard'; import { getTasks } from '../../ExpertDashboard/modules/dashboard';

const mapDispatchToProps = (dispatch) => { return ({ fetchExpertProfile: () => dispatch(fetchExpertProfile()), getTasks: (payload) => dispatch(getTasks(payload)) }); };

const mapStateToProps = (state) => ({ taskList: state.dashboard.taskList, isFetching: state.managerDashboard.isFetching, isAuthenticated: state.managerDashboard.isAuthenticated });

For this i want to use getTask() from another reducer but getting an error.

Please Help ASAP.