0

I have followed below npm link instruction but it doesn't working can someone please help me out on this. https://www.npmjs.com/package/react-paypal-express-checkout/v/1.0.5

Getting below error Invariant Violation: Invariant Violation: Text strings must be rendered within a component.

This error is located at:
in div (created by PaypalButton)
in PaypalButton (created by ScriptLoader)
in ScriptLoader (at Cart.js:20)
in RCTView (at View.js:45)
in View (at Cart.js:19)
in Cart (at SceneView.js:9)
in SceneView (at createTabNavigator.js:39)
in RCTView (at View.js:45)
in View (at ResourceSavingScene.js:37)
in RCTView (at View.js:45)
in View (at ResourceSavingScene.js:26)
in ResourceSavingScene (at createBottomTabNavigator.js:121)
in RCTView (at View.js:45)
in View (at screens.native.js:83)
in ScreenContainer (at createBottomTabNavigator.js:111)
in RCTView (at View.js:45)
in View (at createBottomTabNavigator.js:110)
in TabNavigationView (at createTabNavigator.js:197)
in NavigationView (at createNavigator.js:61)
in Navigator (at createAppContainer.js:429)
in NavigationContainer (at App.js:14)
in RCTView (at View.js:45)
in View (at App.js:12)
in App (at withExpoRoot.js:20)
in RootErrorBoundary (at withExpoRoot.js:19)
in ExpoRootComponent (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)

import PaypalExpressBtn from 'react-paypal-express-checkout';

export default class MyApp extends React.Component {
  render() {
     const client = {
        sandbox:    'YOUR-SANDBOX-APP-ID',
        production: 'YOUR-PRODUCTION-APP-ID',
     }
    return (
        <PaypalExpressBtn client={client} currency={'USD'} total={1.00}/>
    );
 }
   }
Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Qamar
  • 1
  • 2

0 Answers0