INNER CODE UNIT · JavaScript
App
calebnance/expo-spotify · App.js:12
function App() {
const [isLoading, setIsLoading] = React.useState(true);
React.useEffect(() => {
async function prepare() {
try {
// keeps the splash screen visible while assets are cached
await SplashScreen.preventAutoHideAsync();
// pre-load/cache assets: images, fonts, and videos
await func.loadAssetsAsync();
} catch (e) {
// console.warn(e);
} finally {
// loading is complete
setIsLoading(false);
}
}