Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import { anAsyncFunc } from './anotherFile'
  2. export const aThunk = () => async (dispatch, getState) => {
  3. await dispatch(anAsyncFunc)
  4. return disaptch(someOtherAsyncFunc)
  5. }
  6.  
  7. import { aThunk } from './thunks.js'
  8. import MyComponent from './MyComponent'
  9.  
  10. const mapDispatchToProps = {
  11. aThunk
  12. }
  13.  
  14. import { aThunk } from './thunks.js'
  15. import MyComponent from './MyComponent'
  16.  
  17. const mapDispatchToProps = dispatch => ({
  18. aThunk: () => dispatch(aThunk())
  19. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement