react-native-gesture-handler vs react-navigation vs react-native-navigation vs react-native-screens vs react-router-native
React Nativeのナビゲーションとジェスチャーライブラリ
react-native-gesture-handlerreact-navigationreact-native-navigationreact-native-screensreact-router-native類似パッケージ:

React Nativeのナビゲーションとジェスチャーライブラリ

React Nativeの開発において、これらのライブラリはアプリケーションのナビゲーションやユーザーインターフェースのジェスチャー処理を簡素化し、ユーザーエクスペリエンスを向上させるために使用されます。これらのライブラリは、異なるニーズやアプローチに応じて選択できる多様な機能を提供します。

npmのダウンロードトレンド

3 年

GitHub Starsランキング

統計詳細

パッケージ
ダウンロード数
Stars
サイズ
Issues
公開日時
ライセンス
react-native-gesture-handler2,866,5556,7013.29 MB923ヶ月前MIT
react-navigation68,29724,413698 B8972年前MIT
react-native-navigation34,13813,1706.61 MB2351ヶ月前MIT
react-native-screens03,6212.58 MB20317日前MIT
react-router-native056,29840.2 kB1552ヶ月前MIT

機能比較: react-native-gesture-handler vs react-navigation vs react-native-navigation vs react-native-screens vs react-router-native

ジェスチャー処理

  • react-native-gesture-handler:

    このライブラリは、タップ、スワイプ、パンなどの複雑なジェスチャーを処理するための強力なAPIを提供します。特に、ネイティブのタッチイベントを活用することで、スムーズで直感的なユーザーインターフェースを実現します。

  • react-navigation:

    このライブラリは、ナビゲーションの一環として基本的なジェスチャーをサポートしていますが、複雑なジェスチャー処理には向いていません。

  • react-native-navigation:

    このライブラリは、ジェスチャー処理に特化していませんが、ナビゲーションの一部としてジェスチャーを利用することができます。特に、スワイプでの画面遷移などが可能です。

  • react-native-screens:

    このライブラリは、画面遷移の際にジェスチャーを利用することができますが、主に画面のライフサイクル管理に焦点を当てています。

  • react-router-native:

    このライブラリは、React Routerの概念を基にしており、基本的なナビゲーションを提供しますが、ジェスチャー処理には特化していません。

ナビゲーションの柔軟性

  • react-native-gesture-handler:

    このライブラリは、ナビゲーションのための直接的な機能は提供しませんが、他のナビゲーションライブラリと組み合わせて使用することで、柔軟なナビゲーション体験を実現できます。

  • react-navigation:

    このライブラリは、さまざまなナビゲーションスタイルをサポートし、簡単にカスタマイズ可能なナビゲーションを実現します。

  • react-native-navigation:

    このライブラリは、スタックナビゲーション、タブナビゲーション、ドロワーナビゲーションなど、さまざまなナビゲーションパターンをサポートしており、アプリケーションのニーズに応じて柔軟に構成できます。

  • react-native-screens:

    このライブラリは、画面の遷移を最適化するためのツールを提供しますが、ナビゲーションのフレームワーク自体は提供していません。

  • react-router-native:

    このライブラリは、React RouterのAPIを使用して、Reactのコンセプトに基づいた柔軟なナビゲーションを提供します。

パフォーマンス

  • react-native-gesture-handler:

    このライブラリは、ネイティブのタッチイベントを使用するため、パフォーマンスが非常に高く、スムーズなジェスチャー処理を実現します。

  • react-navigation:

    JavaScriptで実装されているため、パフォーマンスは良好ですが、ネイティブナビゲーションに比べると若干劣る場合があります。

  • react-native-navigation:

    ネイティブのナビゲーションを使用するため、パフォーマンスが高く、アプリケーションのスムーズな遷移を実現します。

  • react-native-screens:

    画面のライフサイクルを管理することで、メモリ使用量を削減し、パフォーマンスを向上させることができます。

  • react-router-native:

    React Routerの概念を基にしているため、パフォーマンスは良好ですが、ネイティブの機能には及ばないことがあります。

学習曲線

  • react-native-gesture-handler:

    このライブラリは、基本的な使い方が簡単で、ジェスチャー処理のためのシンプルなAPIを提供しています。

  • react-navigation:

    このライブラリは、使いやすさと柔軟性を兼ね備えており、学習曲線は比較的緩やかです。

  • react-native-navigation:

    このライブラリは、ネイティブナビゲーションの概念を理解する必要があるため、若干の学習曲線がありますが、豊富なドキュメントが用意されています。

  • react-native-screens:

    このライブラリは、比較的シンプルで、画面遷移の最適化に特化しているため、学習しやすいです。

  • react-router-native:

    Reactに慣れている開発者には、学習が容易で、React Routerの知識を活かすことができます。

拡張性

  • react-native-gesture-handler:

    このライブラリは、他のライブラリと組み合わせて使用することで、機能を拡張することができます。

  • react-navigation:

    このライブラリは、プラグインやカスタムナビゲーションロジックを追加することで、柔軟に拡張できます。

  • react-native-navigation:

    このライブラリは、カスタムナビゲーションコンポーネントを作成することで、拡張性が高いです。

  • react-native-screens:

    このライブラリは、他のナビゲーションライブラリと組み合わせて使用することができ、拡張性があります。

  • react-router-native:

    このライブラリは、React Routerの拡張機能を活用することで、拡張性が高いです。

選び方: react-native-gesture-handler vs react-navigation vs react-native-navigation vs react-native-screens vs react-router-native

  • react-native-gesture-handler:

    ユーザーインターフェースにおける高度なジェスチャー処理が必要な場合に選択します。このライブラリは、スワイプやタップなどのジェスチャーを効率的に処理するための強力なツールを提供します。

  • react-navigation:

    簡単にナビゲーションを実装したい場合に選択します。このライブラリは、React Nativeアプリケーションにおけるナビゲーションの実装を簡素化し、柔軟性を提供します。

  • react-native-navigation:

    ネイティブなナビゲーション体験を重視する場合に選択します。このライブラリは、アプリケーションのナビゲーションをネイティブのパフォーマンスで実現するための機能を提供します。

  • react-native-screens:

    画面遷移のパフォーマンスを最適化したい場合に選択します。このライブラリは、画面のライフサイクルを管理し、メモリ使用量を削減することができます。

  • react-router-native:

    Reactのコンセプトに慣れている場合に選択します。このライブラリは、React RouterのAPIをReact Nativeに適用し、同様のナビゲーション体験を提供します。

react-native-gesture-handler のREADME

React Native Gesture Handler by Software Mansion

Declarative API exposing platform native touch and gesture system to React Native.

React Native Gesture Handler provides native-driven gesture management APIs for building best possible touch-based experiences in React Native.

With this library gestures are no longer controlled by the JS responder system, but instead are recognized and tracked in the UI thread. It makes touch interactions and gesture tracking not only smooth, but also dependable and deterministic.

Installation

Check getting started section of our docs for the detailed installation instructions.

Documentation

Check out our dedicated documentation page for info about this library, API reference and more: https://docs.swmansion.com/react-native-gesture-handler/docs/

Examples

If you want to play with the API but don't feel like trying it on a real app, you can run the example project. Clone the repo, go to the example folder and run:

yarn install

Run yarn start to start the metro bundler

Run yarn android or yarn ios (depending on which platform you want to run the example app on).

You will need to have an Android or iOS device or emulator connected.

React Native Support

react-native-gesture-handler supports the three latest minor releases of react-native.

versionreact-native version
2.28.0+0.79.0+
2.26.0+0.78.0+
2.25.0+0.76.0+
2.24.0+0.75.0+
2.21.0+0.74.0+
2.18.0+0.73.0+
2.16.0+0.68.0+
2.14.0+0.67.0+
2.10.0+0.64.0+
2.0.0+0.63.0+

It may be possible to use newer versions of react-native-gesture-handler on React Native with version <= 0.59 by reverse Jetifying. Read more on that here https://github.com/mikehardy/jetifier#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries

License

Gesture handler library is licensed under The MIT License.

Credits

This project has been build and is maintained thanks to the support from Shopify, Expo.io and Software Mansion

shopify expo swm

Community Discord

Join the Software Mansion Community Discord to chat about Gesture Handler or other Software Mansion libraries.

Gesture Handler is created by Software Mansion

Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.