armadiazrino

Untitled

Jun 22nd, 2022
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 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.  
  7. const Bookmark = props => {
  8. useFocusEffect(
  9. useCallback(() => {
  10. AsyncStorage.getItem('bookmark')
  11. .then(data => {
  12. if (data !== null || data !== undefined) {
  13. console.log('data', data);
  14. }
  15. })
  16. .catch(error => console.log('failed to get data :' + error));
  17. }, []),
  18. );
  19.  
  20. return (
  21. <SafeAreaView>
  22. <AppHeader />
  23. </SafeAreaView>
  24. );
  25. };
  26.  
  27. export default Bookmark;
  28.  
Advertisement
Add Comment
Please, Sign In to add comment