[redux-form] "reduxForm()" "Config" interface definition has been adjusted to (#14798)

make the "form" property optional, to more accurately reflect the API.
This commit is contained in:
Matt
2017-03-10 15:26:21 -08:00
committed by Mohamed Hegazy
parent f38e612458
commit 02ccc458a3
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export interface Config<FormData extends DataShape, P, S> {
* the name of your form and the key to where your form's state will be
* mounted under the redux-form reducer
*/
form: string;
form?: string;
/**
* An adapter function that will render a component based on a string component
+2 -1
View File
@@ -57,7 +57,8 @@ reduxForm({
form: 'mySFCForm'
})(MyStatelessFunctionalComponent);
class MyReusableForm extends Component<void, undefined> {
@reduxForm<FormData, any, any>({})
class MyDynamicForm extends Component<void, undefined> {
render() {
return (
<div>