ProductDetail
This screen will show the user all the details about the selected product and allow her to add this selected product to her cart:
/*** src/screens/ProductDetail.js ***/ import React from 'react'; import { Image, ScrollView } from 'react-native'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { Icon, Button, Text } from 'native-base'; import * as ProductsActions from '../reducers/products'; class ProductDetail extends React.Component { static navigationOptions = { drawerLabel: 'Home', tabBarIcon: () => <Icon name="home" />, }; onBuyPress(product) { this.props.addProductToCart(product); this.props.navigation.goBack(); setTimeout(() => this.props.navigation.navigate('MyCart', { product }), 0); } render() { const { navigation } = this.props; const { state } = navigation; const { params } = state; const { product } = params...