Last active
January 27, 2018 22:38
-
-
Save goldensunliu/24ca7174f8bda201c0d8561b114727c1 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
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import { fetchAudioFeaturesById } from '../actions'; | |
import Artist from '../Artist' | |
const mapStateToProps = ... | |
const mapDispatchToProps = ... | |
class ConnectedArtist extends React.Component { | |
... | |
componentWillMount() { | |
const { fetchFullArtist, artistId } = this.props; | |
fetchFullArtist(trackId); | |
} | |
render() { | |
const { artist } = this.props | |
return (<Artist artist={artist}/>) | |
} | |
... | |
}; | |
export default connect(mapDispatchToProps, dispatchToProps)(ConnectedArtist); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment