Skip to content

Commit

Permalink
Correct first argument name into mapStateToProps
Browse files Browse the repository at this point in the history
Having it named mapDispatchToProps can be confusing, since connect takes
a mapStateToProps function as first argument.
  • Loading branch information
scmx authored Jun 14, 2016
1 parent b04e7e4 commit ae866e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/recipes/WritingTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ import { connect } from 'react-redux'
export class App extends Component { /* ... */ }

// Use default export for the connected component (for app)
export default connect(mapDispatchToProps)(App)
export default connect(mapStateToProps)(App)
```

Since the default export is still the decorated component, the import statement pictured above will work as before so you won’t have to change your application code. However, you can now import the undecorated `App` components in your test file like this:
Expand Down

0 comments on commit ae866e3

Please sign in to comment.