react-toggle
react-toggle copied to clipboard
Invariant Violation: View config not found for name input
React-toggle used with Redux Form keeps throwing this error:
Invariant Violation: View config not found for name input, even though props successfully passes 'name' to the Form via my Component.
This is the snapshot of the Component:
const {
id,
input: { name, onChange, value },
meta: { touched, error, warning }
} = this.props;
return (
<View>
<Toggle
name={name}
value={value}
id={id}
checked={true}
value="yes"
onChange={onChange}
icons={false}
disabled={false}
/>
</View>
);
}```
And I pass the component into Redux Form:
```<View>
<Field component={ToggleInput} name="gender" id="id"/>
</View>```