-
Notifications
You must be signed in to change notification settings - Fork 38
Description
When adding the shape prop to the SpotlightTourProvider, the app crashes unexpectedly when stop() method is triggered, and there is no console output or error message to help diagnose the issue.
Steps to Reproduce
- Wrap a component with SpotlightTourProvider.
Pass a shape prop to the SpotlightTourProvider, for example:
const introTourSteps: TourStep[] = [
{
render: ({ stop }) => {
return (
<View>
<Text>
This is the first step of tour!
</Text>
<Button
title='Stop!'
onPress={stop}
/>
</View>
);
},
},
]
return (
<SpotlightTourProvider
steps={introTourSteps}
shape="rectangle"
>
{/* your component here that triggers start tour */}
</SpotlightTourProvider>
)
2. Call the stop() method inside a tour step.
Expected Behavior: The tour ends.
Actual Behavior: The app crashes without logs when the shape prop is added to the SpotlightTourProvider.
Environment:
"react-native": "0.76.5",
"expo": "~52.0.20",
"react": "18.3.1",
"react-native-svg": "15.8.0"
Device/Simulator: iPhone 16 pro max
OS: iOS
Additional Information:
The issue only occurs when the shape prop is set in the SpotlightTourProvider. The value of the shape prop does not matter.
Work-around:
define shape prop inside introTourSteps instead like so:
const introTourSteps: TourStep[] = [
{
shape: 'rectangle',
render: ({ next }) => {
return (
<View style={styles.introTourView}>
<Text style={styles.introTourText}>
This is the first step of tour!
</Text>
<Button
title='Stop!'
onPress={stop}
/>
</View>
);
},
},