Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17327

StripeProvider + Invariant Violation: `new NativeEventEmitter()` requires a non-null argument., js engine: hermes

$
0
0

when I am trying to integrate stripe in react-native component I am getting following error :

Invariant Violation: new NativeEventEmitter() requires a non-null argument., js engine: hermesTypeError: Cannot read property 'StripeProvider' of undefined

I have just imported StripeProvider in my component like this =>

import {StripeProvider} from '@stripe/stripe-react-native';

After which I wrapped my component like this and nothing else.

return (<StripeProvider      publishableKey={STRIPE_PUBLISHABLE_KEY}      merchantIdentifier={STRIPE_MERCHANT_ID}><SafeAreaView        style={{flex: 1, backgroundColor: COLORS.DEFAULT_APP.PRIMARY}}><View style={styles.mainContainer}><Text style={styles.titleMessage}>{title}</Text><Text style={styles.subtitleMessage}>{subtitle}</Text><NeuMorph            size={window.width * 0.8}            style={{              marginTop: 80,              height: 80,              borderRadius: 12,              flexDirection: 'row',            }}><View style={{flex: 2}}><Text style={styles.message}>{message}</Text><Text style={styles.message}>{subMessage}</Text></View><View style={{flex: 1}}><Text style={styles.price}>{currency +''+ price}</Text></View></NeuMorph><View style={{margin: 50}}><MaterialIcons              name={materialIcon}              size={80}              color={COLORS.DEFAULT_APP.TERTIARY}            /></View>          {note && <Text style={styles.noteMsg}>{note}</Text>}<View style={styles.bottomContainer}><NeuMorphButton              buttonSize={300}              title={buttonTitle}              onPressFunction={subscribe}              buttonStyle={{                borderRadius: 24,                height: 50,                margin: 5,              }}            /></View></View></SafeAreaView></StripeProvider>  );

I tried this but it didn't worked for me

text


Viewing all articles
Browse latest Browse all 17327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>