Closed secretlifeof closed 5 years ago
just wanted to open issue about this :)
FYI simple work-around is to have it included like this:
on top of component file:
let PayPalButton = null;
if (typeof window !== 'undefined') {
PayPalButton = require('react-paypal-button-v2').PayPalButton;
}
inside jsx:
{PayPalButton ? <PayPalButton/> : null}
but i hope it will be updated to handle SSR w/o any extra stuff.
Hi,
Version 2.4.0
will support SSR.
$ npm install react-paypal-button-v2@2.4.0 --save
or
$ yarn add react-paypal-button-v2@2.4.0
Thank you very much for taking the time to write this package.
I am getting
using this with SSR (Razzle)
Have you tested this with SSR? Please let me know if you want some more information on my setup.