Skip to content

Instantly share code, notes, and snippets.

import _ from 'lodash'
...
TAB_WALLET: {
screen: createStackNavigator({
Wallet: {
...
}
}),
// Start here
import React from 'react'
import PropTypes from 'prop-types'
import { withNavigation } from 'react-navigation'
import { View, StyleSheet } from 'react-native'
import Screen from './Screen'
import WalletCard from './WalletCard'
import WalletDetails from './WalletDetails'
import { WALLET_TYPES } from '../walletData'
const WalletScreen = ({ navigation, wallets }) => {
import WalletScreen from '../WalletScreen'
...
TAB_WALLET: {
screen: createStackNavigator({
Wallet: {
// Start Here
screen: () => <WalletScreen wallets={WALLET_DATA} />,
path: '/wallet/:selectedWalletId',
// End Here
...
TAB_WALLET: {
screen: createStackNavigator({
Wallet: {
screen: () => (
<Screen>
<Text style={{ textAlign: 'center' }}>Wallet Screen</Text>
</Screen>
),
path: '/wallet',
export const WALLET_TYPES = {
ETHEREUM: 'Ethereum',
BITCOIN: 'Bitcoin'
}
export const WALLET_DATA = [
{
id: 1,
label: 'Investco Partners Wallet',
value: 18675,
import React from 'react'
import PropTypes from 'prop-types'
import { withNavigation } from 'react-navigation'
import { View, TouchableOpacity, Text, StyleSheet } from 'react-native'
import Ionicons from 'react-native-vector-icons/Ionicons'
class HeaderDropdown extends React.Component {
toggleDropdownVisibility = () => {
const isWalletDropdownVisible = this.props.navigation.getParam(
'isWalletDropdownVisible'
import React from 'react'
import { ScrollView, StatusBar, StyleSheet } from 'react-native'
const Screen = ({ children }) => (
<React.Fragment>
<StatusBar barStyle='light-content' />
<ScrollView
style={styles.scrollView}
contentContainerStyle={styles.scrollViewContentContainer}
>
import React from 'react'
import { createAppContainer } from 'react-navigation'
import AppNavigator from './components/navigation/Navigator'
const AppContainer = createAppContainer(AppNavigator)
const App = () => <AppContainer />
export default App
import _ from 'lodash'
import React from 'react'
import { Text } from 'react-native'
import {
createBottomTabNavigator,
createStackNavigator
} from 'react-navigation'
import { Ionicons } from 'react-native-vector-icons'
import Screen from '../Screen'
@aaronbiser
aaronbiser / RN-Header-Navigator.js
Last active January 16, 2019 13:48
React Navigation dropdown header selector
import _ from 'lodash'
import React from 'react'
import { Text } from 'react-native'
import {
createBottomTabNavigator,
createStackNavigator
} from 'react-navigation'
import Ionicons from 'react-native-vector-icons/Ionicons'
import Screen from '../Screen'
import WalletScreen from '../WalletScreen'