mohebifar / mohebifar/react-native-copilot
React native copilot with react-navigation
Nobody has claimed this yet.
- 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
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 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