본문 바로가기
APP/React Native

[React Native] React Native 패키지와 외부 패키지

by isfp_yykkng 2024. 8. 13.

[React Native] React Native 패키지와 외부 패키지

 

 

React Native 컴포넌트 패키지

React Native에서 제공하는 컴포넌트, Api 들을 말한다. RN (React Native) 초기에는 개발자들에게 기본적으로 최대한 많은 API와 컴포넌트들을 제공하고 싶어하여 수많은 패키지를 제공하였다. 하지만 많은 API와 컴포넌트들을 제공하는 탓에 많은 버그들과 느린 사용속도가 단점이었다. 이를 개선하여 안정적이고 빠른 개발을 위해 필수적인 컴포넌트와 API들만 남기고 모두 외부 패키지로 대체하였다.

여기서 남은 패키지들을 RN의 개발 홈페이지에서 볼 수 있다. 

 

Core Components and APIs · React Native

React Native provides a number of built-in Core Components ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen). If you're not sure where to get started, take a look at the following cat

reactnative.dev

 

AccessibilityInfo · React Native

Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The AccessibilityInfo API is designed for this purpose. You can use it to query the current state of the screen reader as well as to register to be notifi

reactnative.dev

 

아래 사진처럼 예전에는 있었으나 현재는 대체된 api 예시로 AsyncStorage, Navigator 등이 있다.

 

외부 패키지

RN에서 제공하는 필수 컴포넌트와 API 들을 제외한 나머지는 외부 패키지 (Third-party Package)로 사용할 수 있다.

React Native Directoryhttps://reactnative.directory/

 

https://reactnative.directory/

 

reactnative.directory

 

해당 외부 패키지는 커뮤니티로 개발하는 사람들이 필요한 기능들을 업데이트 하는 형식으로 만일 그들이 바쁘서 패키지를 업데이트 하지 못하거나 버그 발생한 코드라면 사용할 수 없다는 단점이 있다. 

 

이렇게 커뮤니티가 아니라 Expo에서 제공하는 외부 패키지들도 있다.

 

https://docs.expo.dev/versions/latest/

 

Reference

Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.

docs.expo.dev