The problem with using copilot and connect in one file.
Current Behavior Since copilot requires the use of export default, and I already made export default for connect, a problem arose. All the options that I found to solve the problem allow you to either run or copilot or connect. Here is my code now:
Input Code
import PropTypes from 'prop-types'
class App extends Component {
static propTypes = {
start: PropTypes.func.isRequired,
copilotEvents: PropTypes.shape({
on: PropTypes.func.isRequired,
}).isRequired,
}
constructor(props) {
super(props)
this.waterfallTips = new Tips.Waterfall(
['contacts', 'events', 'actionButton'],
{
onEnd: async () => {
await AsyncStorage.setItem('@Tips', true)
},
}
)
this.state = {
// another params of state
secondStepActive: true,
}
this.handleNextTips = this.handleNextTips.bind(this)
OneSignal.inFocusDisplaying(0)
}
render() {
//.....
}
const mapStateToProps = ({
UserReducer,
NotificationsReducer,
GroupsReducer,
ContactsReducer,
CalendarReducer,
ModalsReducer,
}) => {
return {
UserReducer,
contactsData: ContactsReducer.contactsDataToShow,
NotificationsReducer,
groupsData: GroupsReducer.groups,
CalendarReducer,
ModalsReducer,
}
}
export default connect(
mapStateToProps,
actions
)(copilot()(App))
Expected behavior/code
tell me how to make them work together
Now I get this error:

Try something like this.
const enhance = compose( copilot({ animated: true, overlay: "svg" }), connect(mapStateToProps, actions) );
export default enhance(App);
import { compose } from "redux";
hai @NoKiMa , try:
export default withNavigationFocus(connect(mapStateToProps, mapDispatchToProps) (copilot({ animated: true, overlay: 'svg', })(HomeScreen)));
I got it working like this:
export default copilot()(connect(mapStateToProps)(/* you component */))