hunk.code_window: import io.mockk.mockk
   import org.junit.Assert
   import org.junit.Before
   import org.junit.Test
   class JavaScriptRuntimeTest {
     private lateinit var jsiInterop: JSIInteropModuleRegistry
  
hunk.labels: keep replace keep keep keep keep keep
hunk.file_path: packages/expo-modules-core/android/src/androidTest/java/expo/modules/kotlin/jni/JavaScriptRuntimeTest.kt
hunk.type: replace
file: ---
  title: ViewPager
  sourceCodeUrl: 'https://github.com/callstack/react-native-pager-view'
  packageName: 'react-native-pager-view'
  ---
  
  import { APIInstallSection } from '~/components/plugins/InstallSection';
  import PlatformsSection from '~/components/plugins/PlatformsSection';
  import Video from '~/components/plugins/Video';
  
  **`react-native-pager-view`** exposes a component that provides the layout and gestures to scroll between pages of content, like a carousel.
  
  <Video file={'sdk/viewpager.mp4'} loop={false} />
  
  <PlatformsSection android emulator ios simulator />
  
  ## Installation
  
  <APIInstallSection href="https://github.com/callstack/react-native-pager-view#linking" />
  
  ## Usage
  
  See full documentation at [callstack/react-native-pager-view](https://github.com/callstack/react-native-pager-view).
  
  ## Basic Example
  
  ```js
  import React from 'react';
  import { StyleSheet, View, Text } from 'react-native';
  import PagerView from 'react-native-pager-view';
  
  const MyPager = () => {
    return (
      <View style={{ flex: 1 }}>
        <PagerView style={styles.viewPager} initialPage={0}>
          <View style={styles.page} key="1">
            <Text>First page</Text>
            <Text>Swipe ➡️</Text>
          </View>
          <View style={styles.page} key="2">
            <Text>Second page</Text>
          </View>
          <View style={styles.page} key="3">
            <Text>Third page</Text>
          </View>
        </PagerView>
      </View>
    );
  };
  
  const styles = StyleSheet.create({
    viewPager: {
      flex: 1,
    },
    page: {
      justifyContent: 'center',
      alignItems: 'center',
    },
  });
  
  export default MyPager;
  ```
  