react native 23

22.01.17 firebase 설정 후 pod install 안되는 현상 해결

Ruby ffi 라이브러리를 업데이트 후 다시 설치하는 방법이다. 이 두줄만 치니까 바로 됐다! 그냥 sudo gem 으로 설치하는게 아니라 아키텍쳐를 -x86_64로 설정하고 설치하는 것이다. sudo arch -x86_64 gem install ffi 이것도 똑같이! arch -x86_64 pod install 이렇게 하니까 계속 빌드 failed 나던게 이쁘게 설치됐다! pod deintegrate pod cache clean --all pod install 참고문서링크: https://ondemand.tistory.com/340 애플 M1 환경에서 cocoapod 를 통한 pod install 실패 대응 방법 간만에 Swift 환경으로 넘어오니 묵혀있던 애플 M1 환경에서의 에러 공습이 시작되었습..

react native 2022.01.17

22.01.13 안드로이드 웹뷰 로드 시 흰 화면만 나오는 문제

웹뷰 사용법 https://velog.io/@max9106/React-Native-%EB%A6%AC%EC%95%A1%ED%8A%B8-%EB%84%A4%EC%9D%B4%ED%8B%B0%EB%B8%8Creact-native-WebView%EC%9B%B9%EB%B7%B0 [React Native] 리액트 네이티브(react native) WebView(웹뷰) WebView란 쉽게 말해서 이미 존재하는 웹 페이지를 앱으로 옮기는 것이다. WebView 사용전 준비 WebView를 사용하기 위해서는 WebView를 import해주어야한다. 원래는 리액트 네이티브 core에 있었지만, 리액 velog.io 방법 1. DOM storage에 저장 webview.setDomStorageEnabled(true); htt..

react native 2022.01.13

22.01.10 Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}).

Error: Objects are not valid as a React child (found: object with keys {_U, _V, _W, _X}). If you meant to render a collection of children, use an array instead. 위와 같은 Promise 에러와 함께 useQuery에 대한 결과 값을 저장하면 const { data, loading, networkStatus, error } = await useQuery() 콘솔에는 다음과 같이 networkStatus 가 1, loading 값만 true로 저장되어 나온다. networkStatus 1 loading true error undefined data undefined 원인은 데이터를 ..

react native 2022.01.10

21.12.28 Encountered two children with the same key, '0'.

Encountered two children with the same key, '0'. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted - the behavior is unsupported and could change in a future version. 원인: 배열의 map을 돌릴 때 key로 배열을 구분해주는데 이때 똑같은 배열을 돌리면서 같은 값을 key로 사용하면 발생하는 경고이다. 해결: 배열의 값 중 unique한 다른 값을 key로 사용하면 없앨 수 있는 경고!

react native 2021.12.28

21.12.28 Possible Unhandled Promise Rejection (id: n):

큰 틀에서의 원인은 비동기 처리가 안되어 데이터를 못불러온 상태이며 그에 대한 원인은 다양할 것이다. 나의 경우에는 axios 와 같은 서버 통신 요청을 볼 때, 필요한 인자값이 undefined 라든지 등이 원인이었다. Possible Unhandled Promise Rejection (id: n): axios 호출할 때 then. 다음에 catch로 예외 처리를 추가하여 에러 핸들링으로 해결하였다. .catch(error => { if (error.response) { // 요청이 이루어졌으며 서버가 2xx의 범위를 벗어나는 상태 코드로 응답했습니다. console.log(error.response.data) console.log(error.response.status) console.log(erro..

react native 2021.12.28