mirror of
https://github.com/zhigang1992/redux.git
synced 2026-04-29 04:45:30 +08:00
Merge pull request #1807 from scmx/patch-1
Correct first argument name into mapStateToProps
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user