mohebifar / mohebifar/react-native-copilot
start function is not firing up the Copilot Steps
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
Current Behavior
Everything was working fine till I was at react-native: 0.77.3. As soon as I upgraded to react-native: 0.83.0, I start getting issue of copilot-Steps not appearing or appearing after a lot of time then expected. I fire up the copilot events at start so I use onLayout but when it didn't appear, I tried to fire those events using start function with a Pressable Button but that didn't worked either. Also I have newArchEnabled=true which is essential for my build. Trying Below to give you some glimpse of my code:
Input Code
const { start, copilotEvents } = useCopilot(); // start is ran using onLayout in main View
const [lastEvent, setLastEvent] = useState<string | null>(null);
useEffect(() => {
copilotEvents.on("stepChange", (step) => {
setLastEvent(`stepChange: ${step?.name}`);
});
copilotEvents.on("start", () => {
setLastEvent(`start`);
});
copilotEvents.on("stop", () => {
setLastEvent(`stop`);
dispatch(updateLocalStorageInfo("Schedule_Walkthrough_Completed"))
console.log("Steps Completed")
});
}, [copilotEvents]);
<View style={styles.mainStyle}
onLayout={() => {
setTimeout(() => {
start();
}, 2000);
}}>
- Repo link (1596th Line):
https://github.com/RAWLICK/Rescheduler-App/blob/main/src/Components/Tabs/Schedule.tsx
Expected behavior/code
start function should normally fire up the copilot events as it was working before
Environment
- Device: [Realme P4x]
- OS: [Android 15]
react-native-copilot: [3.3.3]react-native: [0.83.0]react-native-svg: [15.15.1]
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
Start with src/Components/Tabs/Schedule.tsx around the referenced line and trace the useCopilot start/onLayout path. Reproduce the behavior on React Native 0.83.0 with newArchEnabled=true, comparing it with 0.77.3; done means start reliably triggers the Copilot steps and events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100