Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6213

How to show App intro slider once built on expo using typescript using asyncStorage

$
0
0

I'm using react-native-app-intro-slider to show an onboarding for my app built on expo using typescript. I want the slider to only show for the first time during launch but seem to be having trouble with it.

I'm quite new to typescript but I've looked around and all of the solutions seem to be for react native using asyncStorage.

Not sure if I'm doing it right here.

import AsyncStorage from '@react-native-community/async-storage'const data = [{...}, {...}, {...}]AsyncStorage.setItem('showIntro', 'true')function App() {  { (AsyncStorage.getItem('showIntro') === 'true') ? (<AppIntroSlider        renderItem={renderItem}        data={data}        onDone={onDone}/>      ) : (<ShowApp />      )    } }

Viewing all articles
Browse latest Browse all 6213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>