[RN][Expo] SyncSchedule 개발 도움 Document 정리

2023. 11. 1. 23:34· Framework/React Native
목차
  1. Expo Router
  2. 반응형 디자인 적용
  3. Android에서 text 여백 발생 문제
  4. Recoil 적용 시 <RecoilRoot /> 적용 위치 및 SafeAreaView 적용
  5. 모듈 오류

개발

React Native

Expo

TypeScript

 

 

Expo Router

* navigation 방법

    - <Link href="/..." /> : 컴포넌트를 통한 navigation

    - router.push("/...") : 이벤트 발생시 navigation

 

https://docs.expo.dev/routing/navigating-pages/

 

Navigate between pages

Create links to move between pages.

docs.expo.dev

https://www.youtube.com/watch?v=yyGS0adZdsU&list=LL&index=8&t=5351s

 

* params 전달 방법

   - useGlobalSearchParams() 

   - useLocalSearchParams() 

 

https://docs.expo.dev/router/reference/hooks/

 

Hooks API

Learn how to interact with the in-app URL in Expo Router.

docs.expo.dev

 

* header Option 설정

https://expo.github.io/router/docs/migration/react-navigation/screen/

 

Screen | Expo Router

Qualified layouts, like the ones found in expo-router (Stack, Tabs, Navigator) have a static Screen component which can be used to configure the behavior of a route declaratively.

expo.github.io

 

 

반응형 디자인 적용

react-native-responsive-dimensions 사용

https://jiny-dongle.tistory.com/41

 

[React Native] 10. 반응형 디자인 적용하기

1. 반응형 디자인의 필요성 앱의 특성상, 앱을 사용하는 기기의 디스플레이 크기가 천차만별이니 component 등의 사이즈를 해당 크기에 맞게 정해줄 필요가 있다. 본인은 디자이너와의 협업을 위해

jiny-dongle.tistory.com

 

 

Android에서 text 여백 발생 문제

includeFontPadding: false

https://stackoverflow.com/questions/41525842/react-native-android-text-component-extra-padding/56201357#56201357

 

React Native Android Text Component extra padding

I was wondering why am getting these weird padding on my Text in react-native. I tried every thing to just get a perfect text but nothing seems to work the only thing that worked was paddingVertica...

stackoverflow.com

 

 

Recoil 적용 시 <RecoilRoot /> 적용 위치 및 SafeAreaView 적용

// app/_layout.tsx

export default () => {
    return (
        <RecoilRoot>
            <SafeAreaView style={styles.container}>
                <Stack screenOptions={{ headerShown: false }} />
            </SafeAreaView>
        </RecoilRoot>
    )
}

const styles = StyleSheet.create({
    container: {
      flex: 1,
      paddingTop: Platform.OS == "android" ? rh(45) : 0,
      paddingBottom: Platform.OS == "android" ? rh(15) : 0
    }
  })

처음 client file은  app/_layout.

 

Install Expo Router

Learn how to quickly get started by creating a new project with Expo Router or add the library to an existing project.

docs.expo.dev

 

 

 

모듈 오류

@react-native-clipboard/clipboard

네이티브 모듈이라 에러남 =>  expo-clipboard 사용

 

저작자표시 (새창열림)

'Framework > React Native' 카테고리의 다른 글

React Native CLI vs Expo  (0) 2024.02.20
[RN][Expo] 배포  (1) 2023.11.30
[RN][Expo] Semi-Calories 개발 도움됐던 Document 정리  (0) 2023.08.25
[RN][Expo] Axios 를 이용해 API(Spring)와 통신  (0) 2023.08.13
[RN][Expo] expo-media-library 앨범 사진 onEndReached로 계속 가져오기  (0) 2023.08.01
  1. Expo Router
  2. 반응형 디자인 적용
  3. Android에서 text 여백 발생 문제
  4. Recoil 적용 시 <RecoilRoot /> 적용 위치 및 SafeAreaView 적용
  5. 모듈 오류
'Framework/React Native' 카테고리의 다른 글
  • React Native CLI vs Expo
  • [RN][Expo] 배포
  • [RN][Expo] Semi-Calories 개발 도움됐던 Document 정리
  • [RN][Expo] Axios 를 이용해 API(Spring)와 통신
혬수
혬수
수리수리 마수리혬수 님의 블로그입니다.
혬수
수리수리 마수리
혬수
전체
오늘
어제

블로그 메뉴

  • 🏡 Home
  • 🏷️ Tag
  • Github
  • 분류 전체보기 (48)
    • Language (5)
      • JavaScript (5)
      • TypeScript (0)
    • Framework (16)
      • React (1)
      • React Native (15)
    • Testing (2)
      • Jest (0)
      • Postman (1)
    • DevOps (7)
    • Cloud (8)
      • Kubernetes (5)
      • AWS (3)
    • KakaoTech_Bootcamp (4)
      • Weekly Scrum (3)
      • 회고 (1)
    • Etc (5)
      • Git (1)
      • MacOS (4)

인기 글

hELLO · Designed By 정상우.v4.2.2
혬수
[RN][Expo] SyncSchedule 개발 도움 Document 정리
상단으로

티스토리툴바

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.