Skip to content

Instantly share code, notes, and snippets.

@denisraslov
Last active May 2, 2016 21:51
Show Gist options
  • Save denisraslov/3a49982cb454bb125f5f26fb5b2764ce to your computer and use it in GitHub Desktop.
Save denisraslov/3a49982cb454bb125f5f26fb5b2764ce to your computer and use it in GitHub Desktop.
redux-thunk dispatch example
import React from 'react'
import { getUser } from 'actions'
class MyComponent extends React.Component {
//...
// Dispatch the imported action function with the Dispatcher
// that you have because of react-redux.
getUser(id) {
this.props.dispatch(getUser(id));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment