mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Update redux-form-tests.tsx
Improve test examples use of state
This commit is contained in:
committed by
GitHub
parent
bc6bf3c316
commit
8e9543bf94
@@ -138,6 +138,6 @@ const DecoratedInitializeFromStateFormClass = reduxForm<DataShape, {}, {}>({
|
||||
|
||||
// You have to connect() to any reducers that you wish to connect to yourself
|
||||
const mapStateToProps = (state: any) => ({
|
||||
initialValues: { firstName: "some value" } // pull initial values from account reducer
|
||||
initialValues: { firstName: state.account.data.firstName } // pull initial values from account reducer
|
||||
} as {initialValues?: Partial<DataShape>});
|
||||
const ConnectedDecoratedInitializeFromStateFormClass = connect(mapStateToProps)(DecoratedInitializeFromStateFormClass);
|
||||
|
||||
Reference in New Issue
Block a user