Closed patientplatypus6 closed 4 years ago
Seems like I've run into the same issue while updating react and its dependencies. Any hint on how we can work around this issue?
Hi all! I think there's just some confusion here. The stripe.dev
link you mentioned above is for this package, react-stripe-elements
(which is being deprecated). But the code gist you link to is trying to import it from the new package, react-stripe-js
, which has a different API. You are free to keep using this package if you like and follow those docs. But if you are going to use react-stripe-js
, then please follow the code snippets there.
Summary
I am using injectStripe as mentioned here (https://stripe.dev/react-stripe-elements/#card) and
const CardForm = injectStripe(_CardForm);
is returning the errorTypeError: Object(...) is not a function
. I'm not certain what is causing this.Other information
This is the example gist I'm working off of.
https://gist.github.com/patientplatypus6/f21ee944c903ea0938a3c88303b6abd5