mohebifar / mohebifar/react-native-copilot
The problem with using copilot and connect in one file.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
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:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository file or test; start with the App component and the shown export statement combining connect and copilot. Reproduce the reported error, then verify that both wrappers work together in the same file without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100