import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createTrackFileSelector from 'Store/Selectors/createTrackFileSelector'; import TrackRow from './TrackRow'; function createMapStateToProps() { return createSelector( (state, { id }) => id, createTrackFileSelector(), (id, trackFile) => { return { trackFilePath: trackFile ? trackFile.path : null, trackFileRelativePath: trackFile ? trackFile.relativePath : null }; } ); } export default connect(createMapStateToProps)(TrackRow);