본문 바로가기
React Navtive

[RN]컴포넌트,API 가져오기

by hans-j 2023. 5. 12.

https://reactnative.dev/docs/components-and-apis

 

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

위의 사이트에서  컴포넌트와 API들을 가져와서 사용할 수 있다!

 

과거에는 AsyncStorage가 있었는데 이것은 React Native를 위한 local storage다.

 

근데 지금은!!!!!!!!!! 없다..navigation bar도 있었는데 더 이상 제공하지 않는다고한다..(0.65버전 기준)

 

 

 

버그가 너무 많아서.. 모든 Components를 지원하는것이 어렵다고 깨달은 RN팀은....

가장 중요한 기능만 남기고 모두 없애버렸다.

잘가라...

대신 커뮤니티 패키지를 사용하면 된다.

 

https://reactnative.directory/

 

여기에 third-party,pacakges가 있다.

 

이렇게 storage도 사용할 수 있다. 개이득

OR

 

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

expo 천재들이 많은 API들을 만들어놨다! 야호 (이건 RN에서 제공하는거아니고 expo임)

 

 


 자..예를 들어서 RN에서 ScrollView Componet를 가져온다고하자..그렇다면

 

이런식으로 적용하기. horizontal은 가로로 스크롤하고 싶을때 ㅈ거용

 

'React Navtive' 카테고리의 다른 글

[RN]레이아웃,스타일  (0) 2023.05.21
[RN]리액트 네이티브 시작하기  (0) 2023.05.11