mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 19:13:54 +00:00
Improve perf with mapStateToProps scoping
This commit is contained in:
parent
e589edca77
commit
d2eb18fb1f
2 changed files with 6 additions and 2 deletions
|
|
@ -12,4 +12,6 @@ const MonoStereo = props => (
|
|||
</div>
|
||||
);
|
||||
|
||||
export default connect(state => state.media)(MonoStereo);
|
||||
export default connect(state => ({ channels: state.media.channels }))(
|
||||
MonoStereo
|
||||
);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ const Volume = props => (
|
|||
/>
|
||||
);
|
||||
|
||||
const mapStateToProps = state => state.media;
|
||||
const mapStateToProps = state => ({
|
||||
volume: state.media.volume
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
showMarquee: () => dispatch({ type: SET_FOCUS, input: "volume" }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue