React Native Swiper screenshot

React Native Swiper

Author Avatar Theme by Leecade
Updated: 31 Jul 2020
10497 Stars

The best Swiper component for React Native.

Categories

Overview

The react-native-swiper is a popular component that allows developers to implement swipeable views in their React Native applications. It provides various features and options for customization to enhance the user experience.

Features

  • Dependency Remove: Removed ViewPagerAndroid and now uses ScrollView.
  • Test Integration: Setup e2e test and corrected TypeScript types.
  • New Features: Added scrollTo method, disabled PrevButton prop, and optional page rendering.
  • Bug Fixes: Enhanced ES6 and CommonJS compatibility, fixed autoplay replay, and resolved state issues.
  • Changelogs: Detailed list of updates and fixes for each version.

Installation

To install the react-native-swiper component, follow these steps:

  1. Install react-native first.
  2. Initialize a react-native project.
  3. Edit the index.ios.js file in your project.

Example code snippet:

import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import Swiper from 'react-native-swiper';

class MyApp extends Component {
  render() {
    return (
      <Swiper>
        {/* Your swipeable content here */}
      </Swiper>
    );
  }
}

AppRegistry.registerComponent('MyApp', () => MyApp);

Summary

The react-native-swiper component offers a range of features including test integration, new methods for customization, bug fixes, and enhanced compatibility. Developers can easily install the component by following the provided guide and leverage its capabilities to create engaging swipeable views in their React Native applications.