ReactNative

[RN] First-class Support for TypeScript RN0.71

tony-yun 2023. 1. 29. 19:42

https://reactnative.dev/blog/2023/01/03/typescript-first

 

First-class Support for TypeScript · React Native

With the release of 0.71, React Native is investing in the TypeScript experience with the following changes:

reactnative.dev

공식 문서를 통해서 알 수 있듯이, React Native에서 이제 공식적으로 타입스크립트를 중시하기 시작했습니다.

 

New App Template is TypeScript By Default

Starting with 0.71, when you create a new React Native app via the React Native CLI you'll get a TypeScript app by default!

npx react-native init My71App --version 0.71.0

공식 문서에서 중요한 내용만 추출해 요약해 보겠습니다.

 

- RN init build가 0.71 버전부터 default 값으로 typescript 적용.


- 0.71 부터 @types/react-native 의존성을 사용하지 않아도 되며 (0.73에 @types/react-native deprecated될 예정), react native 버전을 0.71로 업그레이드 한다면 @types/react-native 삭제 가능.


- React Native 문서도 typescript 기준으로 재편성.