Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { anAsyncFunc } from './anotherFile'
- export const aThunk = () => async (dispatch, getState) => {
- await dispatch(anAsyncFunc)
- return disaptch(someOtherAsyncFunc)
- }
- import { aThunk } from './thunks.js'
- import MyComponent from './MyComponent'
- const mapDispatchToProps = {
- aThunk
- }
- import { aThunk } from './thunks.js'
- import MyComponent from './MyComponent'
- const mapDispatchToProps = dispatch => ({
- aThunk: () => dispatch(aThunk())
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement