Created
December 8, 2016 02:51
-
-
Save drewlustro/1022d12b8c03d384d8f470906e2211d5 to your computer and use it in GitHub Desktop.
From 12/7 session
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
componentDidMount: function () { | |
var that = this; | |
$.ajax({ | |
url: '/api/artists', | |
type: 'GET', | |
success: function (result) { | |
that.setState({ | |
artists: result | |
}); | |
} | |
}); | |
// other code if neccessary | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment