This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import ApiView from './ApiView'; | |
import axios from 'axios'; | |
import styles from './ApiStyles'; | |
import { | |
StyleSheet, | |
View, | |
ActivityIndicator, | |
FlatList, | |
Text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { View, Text, Button, FlatList, ActivityIndicator } from 'react-native'; | |
import styles from './ApiStyles'; | |
const ApiView = (props) => { | |
const { goForFetch, goForAxios, fromFetch, fromAxios, axiosData, renderItem, FlatListItemSeparator, dataSource, loading } = props | |
return ( | |
<View style={styles.parentContainer}> | |
<View style={{ margin: 18 }}> | |
<Button | |
title={'Click using Fetch'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goForAxios = () => { | |
this.setState({ | |
fromFetch: false, | |
loading: true, | |
}) | |
axios.get("https://jsonplaceholder.typicode.com/users") | |
.then(response => { | |
console.log('getting data from axios', response.data); | |
setTimeout(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goForFetch = () => { | |
this.setState({ | |
fromFetch: true, | |
loading: true, | |
}) | |
fetch("https://jsonplaceholder.typicode.com/users") | |
.then(response => response.json()) | |
.then((responseJson) => { | |
console.log('getting data from fetch', responseJson) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { createBottomTabNavigator } from 'react-navigation-tabs' | |
import { createAppContainer } from 'react-navigation' | |
import TabsHome from '../../App/Screens/Tabs/TabsHome'; | |
import Ionicons from 'react-native-vector-icons/Ionicons'; | |
import TabsKitchen from '../../App/Screens/Tabs/TabsKitchen'; | |
import TabsBedRoom from '../../App/Screens/Tabs/TabsBedRoom'; | |
const TabsNavigation = createBottomTabNavigator({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { createDrawerNavigator } from 'react-navigation-drawer'; | |
import { createAppContainer } from 'react-navigation'; | |
import DrawerHome from '../../App/Screens/Drawer/DrawerHome'; | |
import DrawerBedRoom from '../../App/Screens/Drawer/DrawerBedRoom'; | |
import DrawerKitchen from '../../App/Screens/Drawer/DrawerKitchen'; | |
import { Image } from 'react-native' | |
const DrawerNavigation = createDrawerNavigator({ | |
DHome: { | |
screen: DrawerHome, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { createStackNavigator } from 'react-navigation-stack' | |
import { createAppContainer } from 'react-navigation' | |
import Login from '../../App/Screens/Login/Login'; | |
import Home from '../../App/Screens/Home/Home'; | |
const StackNavigation = createStackNavigator({ | |
Login: { | |
screen: Login, | |
navigationOptions: { | |
header: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { createSwitchNavigator, createAppContainer } from 'react-navigation'; | |
import StackNav from '../StackNavigation/StackNavigation'; | |
import DrawerNav from '../DrawerNavigation/DrawerNavigation'; | |
import TabsNav from '../TabsNavigation/TabsNavigation'; | |
const SwitchNavigator = createSwitchNavigator({ | |
Auth: StackNav, | |
Drawer: DrawerNav, | |
Tabs: TabsNav | |
}, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StoriesData = { | |
data: [ | |
{ image: require('../../assets/1.jpg'), borderColor: 'red', id: 0 }, | |
{ image: require('../../assets/Sunidhi.jpg'), borderColor: 'green', id: 1 }, | |
{ image: require('../../assets/2.jpg'), borderColor: 'blue', id: 2 }, | |
{ image: require('../../assets/9.jpg'), borderColor: 'white', id: 3 }, | |
{ image: require('../../assets/chat2.jpg'), borderColor: 'pink', id: 4 }, | |
{ image: require('../../assets/chat10.jpg'), borderColor: 'gray', id: 5 }, | |
{ image: require('../../assets/chat6.jpg'), borderColor: 'lemon', id: 5 }, | |
{ image: require('../../assets/chat12.jpg'), borderColor: 'sky', id: 6 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import WhatsappChatListView from './WhatsappchatView'; | |
import localData from '../StoriesData'; | |
import { withNavigation } from 'react-navigation'; | |
import { | |
Container, List, ListItem, Left, Right, | |
Thumbnail, Body, Badge, Text, View | |
} from 'native-base'; | |
import styles from './style'; |
NewerOlder