armadiazrino

Untitled

Jun 22nd, 2022
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. import AsyncStorage from '@react-native-async-storage/async-storage';
  2. import {useFocusEffect} from '@react-navigation/native';
  3. import React, {useCallback} from 'react';
  4. import {SafeAreaView} from 'react-native';
  5. import AppHeader from '../../components/AppHeader';
  6. import ListCard from '../../components/ListCard';
  7.  
  8. const Bookmark = props => {
  9. useFocusEffect(
  10. useCallback(() => {
  11. AsyncStorage.getItem('bookmark')
  12. .then(data => {
  13. if (data !== null || data !== undefined) {
  14. console.log('data', data);
  15. }
  16. })
  17. .catch(error => console.log('failed to get data :' + error));
  18. }, []),
  19. );
  20.  
  21. return (
  22. <SafeAreaView>
  23. <AppHeader />
  24. <ListCard />
  25. </SafeAreaView>
  26. );
  27. };
  28.  
  29. export default Bookmark;
  30.  
Advertisement
Add Comment
Please, Sign In to add comment