import React, { Component } from 'react'; import { Text, ScrollView, View, Image } from 'react-native'; import { connect } from 'react-redux'; import { profFetch } from '../actions/'; import { Card, CardSection, Button } from '../components/common'; class Clase extends Component { componentWillMount() { console.log("profProps", this.props); this.props.profFetch({id:this.props.id}); } render() { console.log("ProfRender", this.props); const { profesor } = this.props; const image = `https://plataforma.especificosba.com.ar${profesor.imagen}`; console.log(image); return ( {profesor.nombre} {profesor.apellido} E-mail: {profesor.email} Web: {profesor.web} {profesor.intro} ); } }; const mapStateToProps = state => { console.log("ProfState:", state); return { profesor: state.ProfReducer.profesor }; }; export default connect(mapStateToProps, { profFetch })(Clase);