How to use react-native-tab-view - 10 common examples

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 Musicoin / app / screens / SearchScreen.js View on Github external
inputStyle={{
                backgroundColor: '#30353B',
                color: Colors.fontColor,
              }}
              containerStyle={{
                backgroundColor: '#30353B',
                borderTopWidth: 0,
                borderBottomWidth: 0,
              }}
          />
          {this.state.searching ?
              !this.props.loading.SEARCH ?
                  this.props.searchResults.releases.length > 0 || this.props.searchResults.artists.length > 0 ?
                       this.setState({index, route: this.state.routes[index].key})}
                          initialLayout={{width: Layout.window.width, height: Layout.window.height}}
                      /> :
github EsecuBit / EsecuBit-react-native-wallet / app / pages / eos / EOSVotePage.js View on Github external
render() {
    return (
      
         }
          renderTabBar={props =>
            
          }
          onIndexChange={index => this.setState({index})}
          initialLayout={{width: Dimensions.get('window').width}}
        />
github react-native-community / react-native-tab-view / example / src / NativePagerExample.tsx View on Github external
color: [244, 67, 54],
      },
      {
        key: 'contacts',
        icon: 'ios-people',
        color: [0, 132, 255],
      },
      {
        key: 'albums',
        icon: 'ios-albums',
        color: [76, 175, 80],
      },
    ],
  });

  const renderScene = SceneMap({
    article: Article,
    contacts: Contacts,
    albums: Albums,
  });

  return (
     null}
      onIndexChange={index => {
        setNavigation({ ...navigation, index: index });
      }}
      renderPager={props => (
        
      )}
github withspectrum / spectrum / mobile / views / Search / index.js View on Github external
render() {
    const renderScene = SceneMap({
      threads: this.renderThreadsRoute,
      communities: this.renderCommunitiesRoute,
      people: this.renderPeopleRoute,
    });

    return (
      
    );
  }
github squatsandsciencelabs / OpenBarbellApp / app / configs+constants / NavigationConfig.js View on Github external
import WorkoutScreen from 'app/features/workout/WorkoutScreen';
import SettingsTab from 'app/features/settings/SettingsTab';
import AnalysisScreen from 'app/features/analysis/AnalysisScreen';
import HistoryScreen from 'app/features/history/HistoryScreen';

export const initialIndex = 3;

export const routes = [
    { key: '0', title: 'WORKOUT' },
    { key: '1', title: 'HISTORY' },
    { key: '2', title: 'ANALYSIS'},
    { key: '3', title: 'SETTINGS' },       
];

export const sceneMap = SceneMap({
    '0': () => ,
    '1': () => ,
    '2': () => ,
    '3': () => 
});
github berty / berty / js / packages / components / chat / SharedMedias.tsx View on Github external
))}
			
		
	)

	const [routes] = React.useState([
		{ key: 'medias', title: 'Medias' },
		{ key: 'links', title: 'Links' },
		{ key: 'docs', title: 'Documents' },
	])

	const renderScene = SceneMap({
		medias: mediaView,
		links: linksView,
		docs: documentsView,
	})

	return (
github Cyphexl / WePeiyang-RN / app / screens / gpa-screen / gpa-screen.tsx View on Github external
iconText: "info_outline",
                action: this.toggleModal,
              },
              {
                iconText: "sync",
                action: this._onRefresh,
              },
            ],
          }}
          color={color.module().gpa[1]}
        />

         null}
          onIndexChange={index => this.setState({ index })}
          initialLayout={{ width: Dimensions.get("window").width }}
        />
      
    )
  }
}
github software-mansion / react-native-tab-view-viewpager-adapter / example / App.js View on Github external
const [navigation, setNavigation] = useState({
    index: 0,
    routes: [
      {
        key: 1,
      },
      {
        key: 2,
      },
      {
        key: 3,
      },
    ],
  });

  const renderScene = SceneMap({
    1: () => ,
    2: () => ,
    3: () => ,
  });

  return (
     null}
      onIndexChange={index => {
        setNavigation({ ...navigation, index: index });
      }}
      renderPager={props => (
        
      )}
github bnankiewicz / organic / src / screens / Search.tsx View on Github external
const [navigationState, setNavigationState] = useState({
    index: 0,
    routes: [{key: 'first', title: 'First'}, {key: 'second', title: 'Second'}],
  });
  const setNavigationCallback = useCallback(
    index =>
      setNavigationState(state => ({
        ...state,
        index,
      })),
    [],
  );
  return (
    
  );
}

react-native-tab-view

Tab view component for React Native

MIT
Latest version published 10 months ago

Package Health Score

91 / 100
Full package analysis