From ae866e34ef4a03a0d5bc5ce7f2ae23fcc6784c21 Mon Sep 17 00:00:00 2001 From: Albert Arvidsson Date: Tue, 14 Jun 2016 11:01:51 +0200 Subject: [PATCH] Correct first argument name into mapStateToProps Having it named mapDispatchToProps can be confusing, since connect takes a mapStateToProps function as first argument. --- docs/recipes/WritingTests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes/WritingTests.md b/docs/recipes/WritingTests.md index 9e2b9a4f64..8779c226bb 100644 --- a/docs/recipes/WritingTests.md +++ b/docs/recipes/WritingTests.md @@ -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: