javascript ssr if window exists code example
Example: react check if window exists
if (typeof window !== 'undefined') {
let paypal = require('paypal-checkout');
}
if (typeof window !== 'undefined') {
let paypal = require('paypal-checkout');
}