Faaiz ALAM
Faaiz ALAM

Reputation: 35

After Updating on react 18 paypal button show twice

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

Upvotes: 3

Views: 1555

Answers (2)

Santos Solorzano
Santos Solorzano

Reputation: 96

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.

Upvotes: 1

Faaiz ALAM
Faaiz ALAM

Reputation: 35

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

Upvotes: 0

Related Questions