React Native Turbolinks screenshot

React Native Turbolinks

Author Avatar Theme by Lazaronixon
Updated: 29 Dec 2020
193 Stars

React Native adapter for building hybrid apps with Turbolinks 5

Categories

Overview

React Native Turbolinks is a powerful implementation bringing the fast navigation experience of Turbolinks to React Native applications for both iOS and Android. This library is designed to streamline the building of mobile apps that need web-like page transitions, which can significantly improve the user experience by reducing load times. Whether you’re working on a new app or looking to enhance an existing one, React Native Turbolinks aims to simplify development while providing a seamless navigation experience.

Getting started with React Native Turbolinks is straightforward, especially for those who have set up their projects using react-native init or expo-cli. It’s worth noting that the library currently does not support Fast Refresh, which requires developers to make some adjustments in their development environment. With its demo application, developers can easily see the framework in action, making it easier to understand how to implement its features in their own projects.

Features

  • Single Screen App Initialization: Easily start a Single Screen App using startSingleScreenApp(route, appOption), providing a smooth entry point for the user.
  • Split Screen Support: On iOS, launch a Split Screen App with startSplitScreenApp(primaryComponent, secondaryRoute), ideal for iPad layouts.
  • URL Navigation: Navigate to different routes or components with the visit(route) method, making it simple to switch views.
  • Dynamic Component Replacement: Use replaceWith(route) to swap the current component without losing the navigation context.
  • Session Management: Reload the current visit or session with reloadVisitable() and reloadSession(), ensuring users can refresh their content seamlessly.
  • Cookie Management: Clear all cookies with removeAllCookies() to maintain user privacy and manage session states effectively.
  • Customizable Navigation: Modify the navigation bar dynamically with renderNavBarStyle(navBarStyle), enhancing user interface flexibility.
  • Event Handling: Add event listeners for various events such as turbolinksVisit and turbolinksError, allowing developers to handle navigation events and errors efficiently.