After Updating on react 18 paypal button show twice

1.1k views Asked by At

Hello everyone i want to ask about the issue that after updating my react app my PayPal-buttonv2 rendering couple of times and shows Strictmode issues, please guid me thanks in advance

react-dom.development.js:86 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of n which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node at div at n (https://www.paypal.com/sdk/js?client-id=sb&currency=USD:2:114571) at PayPalButton (http://localhost:3000/static/js/bundle.js:39195:5) at li

2

There are 2 answers

0
Santos Solorzano On BEST ANSWER

My team faced this same issue after we upgraded our app to React 18. If you're now seeing two PayPal buttons after upgrading to React 18, you should use https://github.com/paypal/react-paypal-js if you're not already. This solved the issue for us.

0
Faaiz ALAM On

Just by going back to react 17 button are now showing just normal but strickmode error still there