Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Commit

Permalink
fix(HomeView): rename mapDispatchToProps to mapStateToProps
Browse files Browse the repository at this point in the history
  • Loading branch information
David Zukowski committed Sep 15, 2015
1 parent 85af88a commit 7ca371d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/HomeView.js
@@ -1,12 +1,12 @@
import React from 'react';
import { connect } from 'react-redux';

// We define mapDispatchToProps where we'd normally use the @connect
// We define mapStateToProps where we'd normally use the @connect
// decorator so the data requirements are clear upfront, but then
// export the decorated component after the main class definition so
// the component can be tested w/ and w/o being connected.
// See: http://rackt.github.io/redux/docs/recipes/WritingTests.html
const mapDispatchToProps = (state) => ({
const mapStateToProps = (state) => ({
counter : state.counter
});
export class HomeView extends React.Component {
Expand Down Expand Up @@ -39,4 +39,4 @@ export class HomeView extends React.Component {
}
}

export default connect(mapDispatchToProps)(HomeView);
export default connect(mapStateToProps)(HomeView);

0 comments on commit 7ca371d

Please sign in to comment.