Created
April 23, 2015 19:14
-
-
Save tadjik1/061554608c7af5ec51ff to your computer and use it in GitHub Desktop.
This file contains 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
export default class Tracks extends React.Component { | |
static loadTracks() { | |
let user = await UserActions.getUser(); | |
let playlists = await PlaylistsActions.getPlaylists(user); | |
let tracks = await TracksActions.getTracksByPlaylists(playlists); | |
}; | |
componentWillMount() { | |
//check if we already have some data | |
//if not | |
Tracks.loadTracks(); | |
}; | |
render() {...}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment