Skip to content

Instantly share code, notes, and snippets.

@yarnball
Last active October 4, 2016 13:41
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 yarnball/166d6a59a3daad1991ddfb91fc7a122e to your computer and use it in GitHub Desktop.
Save yarnball/166d6a59a3daad1991ddfb91fc7a122e to your computer and use it in GitHub Desktop.
export default Connect(mapStateToProps, mapDispatchToProps)(React.createClass({
componentWillMount () {
return fetch(DATA_API)
.then((response) => response.json())
.then((json) => {
// console.log(json);
this.setState({testapi: json});
});
this.props.fetchUser();
},
})
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment