Это мой компонент реагирования: < /p>
Код: Выделить всё
const Guide = () => {
const { checkOSVersion } = useGuide();
const { setGuide, guide } = authStore();
const navigation = useNavigation();
const [isAnimationFinished, setIsAnimationFinished] = useState(false);
useEffect(() => {
if (!guide) {
if (isAnimationFinished) {
handleSkip();
}
}
}, [isAnimationFinished]);
const handleSkip = () => {
setGuide();
navigation.navigate('TabStack', { screen: 'Dashboard' });
};
const handleAnimationFinish = () => {
setIsAnimationFinished(true);
};
return (
{checkOSVersion && (
)}
);
};
export default Guide;
< /code>
Я попытался «предварительно загружать» видео, как это: < /p>
const [videoReady, setVideoReady] = useState(false);
const handleSkip = () => {
setGuide();
};
return (
setVideoReady(true)}
/>
);
};
Подробнее здесь: https://stackoverflow.com/questions/785 ... nds-in-app
Мобильная версия