Jamming project

In this project, in SearchResults.js we give tracks attribute to TrackList component and set its value to this.props.searchResults: <TrackList tracks = {this.props.searchResults} />
Also, in Playlist.js ,we give tracks attribute to Tracklist component and set its value to this.props.playlistTracks: <TrackList tracks = {this.props.playlistTracks} /> .
Can we set one attribute for two props ? And when we give 2 props to one attribute, do we reassign value?

One of the great things about React is the reusability of components. The TrackList component basically generates a list of tracks for us but needs to get some props (including the tracks to use). This component is reused in Jammming by both SearchResults and Playlist which are components higher up in the hierarchy. Data typically flows down in React as props.

The SearchResults component uses TrackList to generate a list of the search-results. And then our Playlist component also uses TrackList to generate a list of the tracks we have added to the list. TrackList receives different values for props in these cases and that data is completely separate from the other component which is using TrackList. You can always get the dev-tools React add-on and see what’s going on with the props.