Skip to content

Instantly share code, notes, and snippets.

@pjullah
Last active May 19, 2017 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjullah/e66f984f2441557b8f8eab7ca1bb22d5 to your computer and use it in GitHub Desktop.
Save pjullah/e66f984f2441557b8f8eab7ca1bb22d5 to your computer and use it in GitHub Desktop.
Some notes about React, Router, Redux, Thunk etc

ReactRouter.withRouter injects route information into wrapped component props.

render() { const { match, location, history } = this.props
const Component = withRouter(Component)

Redux-thunk

Best explanation of what Redux-thunk does

...it is a middleware that looks at every action that passes through the system, and if it’s a function, it calls that function. That’s all it does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment