mohebifar / mohebifar/react-native-copilot

Autostart on mount

Open
#287 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Whenever i try to start the tour from useEffect, It does'nt work even if am passing setTimeout to it. Example code is given below:

const tour = useCopilot()
useEffect(()=>{
setTimeout(()=>{
tour.start("repaircat");
}, 600)
},[])

In the first screen I have started the tour by passing start() to the button click but in the second screen i want to initiate the tour again by calling start with the name of step through useEffect.

Is there any way to start the tour without clicking any button?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the useCopilot hook and the start("repaircat") call shown in the issue, then trace how that entry point behaves when invoked from useEffect after navigation. Determine whether starting without a button is supported and what lifecycle condition is required. Done means the requested second-screen autostart works reliably, with a regression test if the project has coverage for this entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.