LoginSignup
20
13

More than 1 year has passed since last update.

React Native でとりあえず入れとけって感じのパッケージ

Last updated at Posted at 2020-10-29

大体使うパッケージは決まっていると思うので、どんなアプリでも大体必要になりそうなものを集めました。

想定バージョン: 0.63.x

yarn add \
    ahooks \
    dayjs \
    react-native-device-info \
    react-native-fast-image \
    react-native-fbsdk-next \
    react-native-gesture-handler \
    react-native-localize \
    react-native-notifications \
    react-native-reanimated \
    react-native-safe-area-context \
    react-native-screens \
    react-native-vector-icons \
    react-native-webview \
    tailwind-rn \
    zustand \
    @invertase/react-native-apple-authentication \
    @react-native-async-storage/async-storage \
    @react-native-community/google-signin \
    @react-native-community/masked-view \
    @react-native-community/netinfo \
    @react-native-firebase/app \
    @react-native-firebase/auth \
    @react-native-firebase/dynamic-links \
    @react-navigation/drawer \
    @react-navigation/native \
    @react-navigation/stack \
    @react-navigation/bottom-tabs

yarn add -D \
    @types/react \
    @types/react-native \
    @types/react-native-fbsdk \
    @types/react-native-vector-icons \
    typescript 

ほぼ確定で入れる系

react-native-fast-image

標準の Image より早い、キャッシュがちゃんと効いてくれる

react-native-device-info

バージョン取りたいときとか

react-native-webview

静的なページの表示で、だいたい使うだろう

@invertase/react-native-apple-authentication

iOS では必須になりました

@react-native-async-storage/async-storage

使わないアプリはあんま無さそう

2021/08/16: @react-native-community/async-storage に変わってた

@react-native-community/netinfo

オフライン表示したい時とか

react-native-vector-icons

6000種類くらいのアイコンが入ってる

デファクトスタンダード系

@react-navigation/native

  • @react-native-community/masked-view
  • @react-navigation/stack
  • react-native-gesture-handler
  • react-native-reanimated
  • react-native-safe-area-context
  • react-native-screens

要件次第だが、付随して下記も入れる。

  • @react-navigation/drawer
  • @react-navigation/bottom-tabs

react-native-localize

タイムゾーンとか取得する用

@react-native-community/google-signin

公式 Google ログイン

react-native-fbsdk-next

公式 Facebook ログイン。以前は react-native-fbsdk だったがコミュニティに移管された

react-native-notifications

@react-native-community/push-notification-ios でも良いが、それだと Android と共通化できない

必須でもなんでもないが、個人的にいつも使うパッケージ

ahooks

React Hooks のユーティリティ。 react-use は DOM 依存のため、 React Native では使えない

dayjs

Moment の代わり

tailwind-rn

楽にスタイルが定義できる。 Styled Components とかより記述量減らせる

Zustand

Hooks 時代の状態管理。 Jotai や Recoil などでも OK だが、 React の外でステートをいじりたい場合がネイティブだと多少あるため Zustand を推奨します

Firebase 認証を入れるなら

  • @react-native-firebase/app
  • @react-native-firebase/auth
  • @react-native-firebase/dynamic-links

dynamic-links はメールアドレスのリンクログインで必要になる。

20
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
13