Skip to content

Tooltip Text Updates Prematurely #344

@robgraeber

Description

@robgraeber

Current Behavior
The tooltip text updates visually before it goes to the next step. This results in a flash of out of place text before the next step loads. Video attached. I'm also using React Native's new architecture. I'm using a custom tooltip, but it also happens with the default tooltip.

Think the issue is from how the current step is being updated, it is updating the current step prop immediately while the moveModalToStep is asynchronous:
https://github.com/mohebifar/react-native-copilot/blob/master/src/contexts/CopilotProvider.tsx#L104

Demo

Screen.Recording.2025-05-01.at.8.24.29.PM.mov

Expected behavior/code
Expected the text would not change until the next step is rendered.

Environment

  • Device: iPhone 14 Simulator
  • OS: iOS16
  • react-native-copilot: 3.3.3
  • react-native: 0.77.1
  • react-native-svg: 15.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions