Skip to content

Instantly share code, notes, and snippets.

@tadjik1
Created April 23, 2015 19:14
Show Gist options
  • Save tadjik1/061554608c7af5ec51ff to your computer and use it in GitHub Desktop.
Save tadjik1/061554608c7af5ec51ff to your computer and use it in GitHub Desktop.
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