O'Reilly logo

React Native Blueprints by Emilio Rodriguez Martinez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Payment

We will use the react-native-credit-card-input library to capture the user's credit card details. For this screen to work, we will request the cart, the user, and several important actions from Redux:

/*** src/screens/Payment.js ***/import React from 'react';import { View } from 'react-native';import { CreditCardInput } from 'react-native-credit-card-input';import { bindActionCreators } from 'redux';import { connect } from 'react-redux';import { Icon, Button, Text, Spinner, Title } from 'native-base';import PropTypes from 'prop-types';import * as PaymentsActions from '../reducers/payments';import * as UserActions from '../reducers/user';import LoginOrRegister from '../components/LoginOrRegister';class Payment extends React.Component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required