How to use the react-native-tab-view.PagerExperimental function in react-native-tab-view

To help you get started, we’ve selected a few react-native-tab-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github birkir / kvikmyndr-app / src / components / week-tab-view / WeekTabView.tsx View on Github external
import * as React from 'react';
import { View, Dimensions, Animated, Platform, Insets } from 'react-native';
import { observer } from 'mobx-react';
import Reanimated from 'react-native-reanimated';
import { TabView, TabBar } from 'react-native-tab-view';
import * as GestureHandler from 'react-native-gesture-handler';
import { autobind } from 'core-decorators';
import { format, addDays } from 'date-fns';
import { runScrollEndSpring } from 'utils/runScrollEndSpring';
import store from 'store';

const PagerExperimental = require('react-native-tab-view').PagerExperimental;
const styles = require('./WeekTabView.css');

interface IProps {
  testID?: string;
  insets?: Insets;
  render(route: { key: string; date: Date; }): React.ReactNode;
  useScrollView?: boolean;
  hideTabsOnScroll?: boolean;
  selectedTab?: number;
}

const NAVBAR_HEIGHT = 56;
const INITIAL_LAYOUT = {
  height: 0,
  width: Dimensions.get('window').width,
};

react-native-tab-view

Tab view component for React Native

MIT
Latest version published 11 days ago

Package Health Score

98 / 100
Full package analysis