본문 바로가기

dev/react-native

RN에서 TS사용시 styled-components/native type import 에러 1. 증상 및 환경 - window10 - styled-components 5.2.1 - @types/styled-components 5.1.7 2. 원인 native.d.ts 를 찾지 못해서 발생 3. 해결책 1) @types/styled-components를 설치했는지 확인한다. 2) 타입스크립트에서 noImplicitAny 옵션을 끈다. 초기에 styled components에 타입이슈가 많았을 때 쓴 방법이라고 한다. 그냥 에러로 잡지 않는 것이기 때문에 해결책이라 보기는 어렵다. 3) @types/styled-components 대신 @types/styled-components-react-native를 사용한다. github.com/dooboolab/hackatalk/pull/331 Fix St..
vscode에서 expo react native 디버깅 유튜브에 동영상이 있는데, 동영상대로 하면 제대로 디버깅 되지 않습니다. react native tools 공식 문서를 따라하면 제대로 설정됩니다. 1. React native tools 설치 및 설정 - vscode 에서 react native tools extension을 설치합니다. - 설정에 들어갑니다. - packager 포트를 19001로 변경합니다. 2. launch.json 설정 - vscode 디버그 탭에 create a launch.json file 클릭해 launch.json 파일을 생성합니다. - 아무거나 선택해 줍니다. 저는 VS Code Extension Development 선택했습니다. - Add configuration을 클릭한 후, Debug in Exponent를 선택합..
RN 초기 설정시 발생한 에러 처리 1.Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0 #29829 react native cli 를 설치 후 react-native init 시 발생하는 에러다. Gradle 버전 이슈이며, 비교적 최근에 발견된 이슈다. 글을 읽다 보면 적절한 처리법이 있다. github.com/facebook/react-native/issues/29829#issuecomment-727280671 Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0 · Issue #29829 · facebook/rea..