[英]React Native Expo splash with progress bar
您可以在應用程序加載時顯示該進度屏幕:
export default function App() {
const [appIsReady, setAppIsReady] = useState(false);
useEffect(() => {
async function prepare() {
await loadAllYourData();
setAppIsReady(true);
}
prepare();
}, []);
return appIsReady ? (
<View>
<Text>My App</Text>
</View>
) : (
<MySplashScreenWithProgressBar />
);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.