rn-sherpa
Version:
A lightweight, flexible React Native library for creating powerful, step-by-step guided product tours with smart positioning and animations
18 lines (16 loc) • 312 B
text/typescript
import { useRef } from 'react';
/**
* Hook to create a ref for a tour step target
*
* @example
* ```tsx
* const stepRef = useStepRef();
*
* <View ref={stepRef}>
* <Text>This component will be highlighted</Text>
* </View>
* ```
*/
export function useStepRef<T = any>() {
return useRef<T>(null);
}