본문 바로가기

Develop

Google login with expo 기본적으로 Expo의 기본 라이브러리를 사용하였다.const response: any = await Google.logInAsync({ clientId});const { type, accessToken } = response;문제없이 잘 동작할꺼라 예상하였는데 로그인 페이지에서 문제가 있었다.페이스북 로그인의 경우 메뉴얼상에 상세하게 나와있지만 구글은 해당 내용이 없어 쉽게 처리가 될줄 알았는데..redirect_url이 동작을 안하는 문제였다. 구글 콘솔에서 redirect_url을 넣어줘도 앱상에서 Web Type에 사용할수 없는 url이라는 에러가 발생한다.검색결과 expo 32 이상에서 발생한다는 말도 있었다.해결법은 기존에 Web 토큰을 받는 방식을 사용하지 않고 Google Console에서 .. 더보기
New Features in ES6 Fat Arrow Functionconst getNumber = () => 1; const getArray = () => [1, 2, 3]; const getObject = () => ({a: 1, b: 2, c: 3}); const withParam = (payload) => payload;Object Manipulationconst {a, b} = result; const {data: {a, b}} = result; const firstObj = {a, b}; (Same as {a: a, b:b}) const secondObj = {c, d}; const mergeObj = { ...firstObj, ...secondObj};Async Function(Promise)const isTrue = (pay.. 더보기
Create Expo + ReactNative + Typescript Manually I can make Expo + ReactNative + Typescript via below script easily.]$ create-react-native-app {{APP_NAME}} --scripts-version=react-native-scripts-tsBut, Sometimes I need setup typescript manually.Here the solution !]$ yarn add -D typescript tslib @types/react @types/react-native @types/expoWrite App.js file below..import AppContainer from "./src/AppContainer"; export default AppContainer;Make sr.. 더보기