💬 졸작 중 expo bare workflow -> react native cli로 개발 환경 변경
npx expo start --dev-client
npx react-native run-android
로그인을 토큰 형식으로 해서 저장해두고 있었는데 사용이 불가능하게 됨
-> react-native-sensitive-info로 변경
npm i react-native-sensitive-info
import * as SecureStore from 'expo-secure-store';
// 데이터 저장
SecureStore.setItemAsync('Token', 'yourTokenValue');
// 데이터 검색
SecureStore.getItemAsync('Token');
import SInfo from 'react-native-sensitive-info';
// 데이터 저장
SInfo.setItem('Token', 'yourTokenValue', {});
// 데이터 검색
SInfo.getItem('Token', {}).then(value => {
if (value) {
} else {
console.log('토큰 없음');
}
});
npm i react-native-vector-icons
// android/app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" <-- 추가
import { AntDesign } from '@expo/vector-icons';
<AntDesign name="left" size={24} color="black" />
https://ionic.io/ionicons 얘를 사용했음
import Icon from 'react-native-vector-icons/Ionicons';
<Icon name="chevron-back-outline" size={24} color={tintColor} />
npm i react-native-gesture-handler
간단하게 설치만 해주면 해결됐다
이것저것 변경하느라 힘들었지만
예전 오류들이 싹 사라져서 바꾼 후 행복하다 💙