Skip to content

Commit ae866e3

Browse files
authored
Correct first argument name into mapStateToProps
Having it named mapDispatchToProps can be confusing, since connect takes a mapStateToProps function as first argument.
1 parent b04e7e4 commit ae866e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/recipes/WritingTests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ import { connect } from 'react-redux'
412412
export class App extends Component { /* ... */ }
413413

414414
// Use default export for the connected component (for app)
415-
export default connect(mapDispatchToProps)(App)
415+
export default connect(mapStateToProps)(App)
416416
```
417417

418418
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:

0 commit comments

Comments
 (0)