I have the following code in my React Native app:
class ModalComponent extends Component {
render() {
return (
<Modal visible={this.props.visible}>
<View>
<View>
<Field/>
</View>
<View>
<Field/>
</View>
<View>
<Field/>
</View>
</View>
</Modal>
);
}
}
ModalComponent = reduxForm({
form: 'modalComponentForm'
})(ModalComponent)
export default connect(mapStateToProps, bindAction)(ModalComponent);
Previously I was importing Modal from react-native and it worked fine, but now I'm importing it from native-base and it throws the error Field must be inside a component decorated with reduxForm().
In other posts with this error, it was just a matter of wrapping the component in reduxForm() the way I've done here.
Does anyone know what could be causing this error?