Created
February 10, 2017 23:26
-
-
Save michaltakac/e6e6c5221a0c910f3f47ef9d9ceaa23a to your computer and use it in GitHub Desktop.
barthackahton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class componentName extends Component { | |
constructor(props) { | |
this.state = { | |
spotreba: '' | |
} | |
} | |
componentWillMount() { | |
var self = this; | |
axios.get(url) | |
.then(function(response) { | |
self.setState({ | |
spotreba: response.data | |
}) | |
}) | |
} | |
componentDidMount() { | |
} | |
render() { | |
return ( | |
<div> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment