As I develop an app in React Native integrating with Stripe, I keep encountering a warning stating "
[ReferenceError: Can't find variable: document]
".
I am struggling to pinpoint the cause of this error. One possibility that comes to mind is that the Stripe module may be specifically designed for use with React JS and is attempting to reference the HTML document.
I suspect that the following line of code is triggering the warning:
import {loadStripe} from '@stripe/stripe-js';
The warning consistently appears when this line is included. After consulting the documentation, I was unable to find any relevant information.
If anyone can provide guidance on what could be causing this issue or clarify if Stripe is compatible with React Native for cross-platform apps, please share your insights.