Guest User

Untitled

a guest
Oct 21st, 2019
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { useState, useEffect, } from 'react';
  2. import { SafeAreaView, Image, StyleSheet, AsyncStorage, StatusBarPropsAndroid } from 'react-native';
  3. import logo from '../assets/logo.png'
  4.  
  5. export default function List() {
  6. const [techs, setTechs] = useState([])
  7. useEffect(() => {
  8. AsyncStorage.getItem('techs').then(storagedTechs => {
  9. const techsArray = storagedTechs.split(',').map(tech => tech.trim())
  10. setTechs(techsArray)
  11. })
  12. }, [])
  13.  
  14. return (
  15. <SafeAreaView styles={styles.container}>
  16. <Image source={logo} />
  17. </SafeAreaView>
  18. )
  19. }
  20.  
  21. const styles = StyleSheet.create({
  22. container: {
  23. flex: 1,
  24. },
  25. logo: {
  26. height: 32,
  27. }
  28. })
RAW Paste Data