reactjs / react-php-v8js

PHP library that renders React components on the server
Other
1.33k stars 127 forks source link

`window` should not be defined during SSR #35

Open ernestre opened 6 years ago

ernestre commented 6 years ago

Some react libraries render their components differently if the window object is defined. Currently if the window object is unefined, this is assigned to the window, which is not the actual window object. This causes errors like these :

webpack-internal:///643:57: TypeError: Cannot read property 'userAgent' of undefined