[react-native] expo 초기세팅

HELLO WORLD🙌·2020년 6월 26일
0

TIL

목록 보기
12/23

expo로 초기 세팅하기

$ expo init <프로젝트명>
$ blank (typescript) 선택
$ cd <프로젝트명>
$ yarn start
  • styled-components 라이브러리와 typescript 연동을 위한 라이브러리 설치
$yarn add styled-components
$yarn add styled-components @types/styled-components

import styled from 'styled-components/native'
  • babel-plugin-styled-components:
    필수는 아니지만 디버깅시 class명을 확인하기 쉽게 만들어 준다.
    babel.config.js에 아래와 같이 설정하자.
module.exports = {
  ...
  plugins: ['babel-plugin-styled-components'],
};
  • Jest 설치
yarn add --dev typescript @types/jest @types/react @types/react-native @types/react-test-renderer

0개의 댓글