Skip to content

Instantly share code, notes, and snippets.

View nazrdogan's full-sized avatar
🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
View GitHub Profile
/* ***********************************************************
* A short word on how to use this automagically generated file.
* We're often asked in the ignite gitter channel how to connect
* to a to a third party api, so we thought we'd demonstrate - but
* you should know you can use sagas for other flow control too.
*
* Other points:
* - You'll need to add this saga to sagas/index.js
* - This template uses the api declared in sagas/index.js, so
* you'll need to define a constant in that file.
import React from 'react';
import { Button, Text, View } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { createStackNavigator, createBottomTabNavigator, createAppContainer } from 'react-navigation';
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Home!</Text>
import React from 'react';
import { Text, View } from 'react-native';
import { createBottomTabNavigator, createAppContainer } from 'react-navigation';
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Home!</Text>
</View>
import React from 'react';
import { Button, Image, View, Text } from 'react-native';
import { createStackNavigator, createAppContainer } from 'react-navigation'; // 1.0.0-beta.27
class HomeScreen extends React.Component {
static navigationOptions = ({ navigation }) => {
const params = navigation.state.params || {};
return {
headerLeft: (
<Button
class HomeScreen extends React.Component {
static navigationOptions = {
title: 'Home',
headerStyle: {
backgroundColor: '#f32356',
},
headerTintColor: '#000',
headerTitleStyle: {
fontWeight: 'bold',
},
class HomeScreen extends React.Component {
static navigationOptions = {
title: 'Home',
};
}
class DetailsScreen extends React.Component {
static navigationOptions = {
title: 'Details',
};
}
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer,withNavigation} from "react-navigation";
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Button mode="contained" onPress={() => this.props.navigation.navigate("Detail") }> Child Detaya Git</Button>
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer,withNavigation} from "react-navigation";
class HomeChild extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
import React from 'react';
import { Button } from 'react-native';
import { withNavigation } from 'react-navigation';
class MyBackButton extends React.Component {
render() {
return <Button title="Back" onPress={() => { this.props.navigation.goBack() }} />;
}
}
import React from "react";
import { View, Text } from "react-native";
import { Button } from 'react-native-paper';
import { createStackNavigator, createAppContainer } from "react-navigation";
class HomeChild extends React.Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>