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: hermes
TypeError: 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