보안에 민감하지 않으며 앱을 종료 후 다시 실행하였을 때에도 데이터가 유지되어야 하는 경우에 사용한다. 사용방법은 웹의localStorage와 비슷하다.
💿 설치
https://react-native-async-storage.github.io/async-storage/docs/install
📔 사용 설명
import EncryptedStorage from 'react-native-encrypted-storage';
await AsyncStorage.setItem('키', '값');
await AsyncStorage.removeItem('키');
const 값 = await AsyncStorage.getItem('키');
보안에 민감할때 사용한다. 앱을 종료 후 다시 실행하였을 때에도 데이터가 유지되어야 하는 경우에 사용한다. 사용방법은 AsyncStorage와 비슷하다.
💿 설치
https://www.npmjs.com/package/react-native-encrypted-storage
📔 사용 설명
import EncryptedStorage from 'react-native-encrypted-storage';
await EncryptedStorage.setItem('키', '값');
await EncryptedStorage.removeItem('키');
const 값 = await EncryptedStorage.getItem('키');
promise로 await을 사용한다.
.
.
.
.