1

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.

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))

Now I get this error

Please, tell me how to make them work together.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

0 Answers0