import React from 'react'; import { View, Text } from 'react-native'; import { Button, LinearProgress } from 'react-native-elements'; const LinearProgressAPI: React.FunctionComponent = () => { const [progress, setProgress] = React.useState(0); React.useEffect(() => { let subs = true; if (progress < 1 && progress !== 0) { setTimeout(() => { if (subs) { setProgress(progress + 0.1); } }, 100); } return () => { subs = false; }; }, [progress]); return ( Indeterminate Variant Indeterminate Variant with color Determinate Variant