airwallex / airwallex-payment-demo

Airwallex payment element integration demo
39 stars 24 forks source link

Many problems with react examples #30

Closed tjmcewan closed 2 years ago

tjmcewan commented 3 years ago

The react example:

  1. is missing dep axios
  2. will not compile because the .eslintrc.js tells prettier to error if not using single quotes, but double quotes are used throughout the example
  3. several variables in Card.jsx aren't declared properly (e.g. onFocus, onBlur)
  4. inputErrorMessage isn't included in useEffect's dep array in SplitCard.jsx

The react-ts example:

  1. won't npm install without --force because the versions of react-scripts & typescript conflict
  2. won't compile with the args passed to redirectToCheckout or createElement; tried to fix this but ended up getting confusion between id & intent_id so I think maybe it's just using an old version of the lib or types?
chao-ding-awx commented 3 years ago

@tjmcewan Thank you for your attention and contribution to this repo. Your commits are really helpful for us.

For the id and intent_id, yes, you're right. id is deprecating props. To compatible with previous version, we still accept it. But forget to update it here.