mohebifar / mohebifar/react-native-copilot

React native copilot with react-navigation

Open
#157 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello. Anyone know when to call start() function if i am using react-navigation createBottomTabNavigator and changing screens.
I want to highlight different views on different screens that can be switch with this bottom bar.
Howerver, when i am trying to use useEffect(() => {}, []) or even react navigation events like
onDidFocus i got them trigger before my simulator actually rendered view. So the highlightning area is empty.
One of workaround is to setTimeout inside of useEffect and only then call start, but maybe there is some way to detect screen is fully loaded and shown ? Thanks.

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 by reproducing the issue with react-navigation's createBottomTabNavigator and the react-native-copilot start() call. Compare useEffect with the onDidFocus event and the setTimeout workaround while checking when the simulator renders the view; done means establishing a reliable way for highlighting to begin after the target screen is shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.