react-native-copilot
react-native-copilot copied to clipboard
Tooltip Text Updates Prematurely
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
https://github.com/user-attachments/assets/710dd2b3-b500-4dff-9e04-ad6374df44c6
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.3react-native: 0.77.1react-native-svg: 15.8.0