I'm Getting this error - "The Component for route 'HomeScreen' must be a React Component while using Redux connect()" while applying Redux connect() and while removing connect() the app works fine in react native.
Below I have mentioned the code:
import React, { Component, Fragment } from 'react';
import { View, Text } from 'react-native';
import {connect} from 'react-redux';
class Sample extends Component {
constructor(props) {
super(props);
this.state = {
loading: true,
dataSource: {}
};
}
render() {
return (
<View>
<Text>Hi</Text>
</View>
)
}
}
const container = connect()(Sample);
export default container;
Also I have tried to downgrade React Redux version from 7.0.1 to 6.0.1, But still I'm facing the same issue.
Also I have tried the Solution, but still the problem exists.