import React, { Component } from 'react'; import { Button, View, Text , TouchableOpacity, FlatList, ActivityIndicator} from 'react-native'; import {bindActionCreators} from 'redux'; import { connect } from 'react-redux'; import * as Actions from '../actions'; //Import your actionss class Home extends Component { constructor(props) { super(props); this.state = { token:false, tokenData:'', loggedIn:false, onHold:true, user:{} }; } componentDidMount() { //this.props.logoutUser(); this.props.getUserInfo(); console.log('logged:'+this.props.loggedIn); console.log('there we go') console.log(this.props.user) } bClick(){ //this.props.logoutUser(); //var navigate = this.props.navigation.navigate } _logout = () => { console.log("asdasd"); // this.props.navigation.navigate('scan'); this.props.getUserInfo(); // this.props.logout(); this.props.logoutUser(); } render() { const { navigate } = this.props.navigation; if(this.props.token){ console.log(this.props.user) return (