Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Side Rendering #8

Open
catamphetamine opened this issue Jul 31, 2015 · 4 comments
Open

Server Side Rendering #8

catamphetamine opened this issue Jul 31, 2015 · 4 comments

Comments

@catamphetamine
Copy link

ReferenceError: window is not defined
    at module.exports (G:\work\cinema\node_modules\boron\node_modules\react-kit\getVendorPrefix.js:9:18)

no window on the server
use something instead (maybe this, maybe global)

@g-p-g
Copy link

g-p-g commented Aug 13, 2015

Indeed, one possible workaround is:

var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
if (canUseDOM) {
  var insertKeyframesRule = require('react-kit/insertKeyframesRule');
  var appendVendorPrefix = require('react-kit/appendVendorPrefix');
} else {
  var insertKeyframesRule = function() {};
  var appendVendorPrefix = function() {};
}

@the1sky
Copy link

the1sky commented Jan 21, 2016

when using boron, I got this error: 'ReferenceError: document is not defined'

@catamphetamine
Copy link
Author

Just use react-modal everybody

On Thursday, January 21, 2016, the1sky notifications@github.com wrote:

when using boron, I got this error: 'ReferenceError: document is not
defined'


Reply to this email directly or view it on GitHub
#8 (comment).

@YarivGilad
Copy link

but it is not as pretty... :)
@g-p-g - did you mean this code to be changed in the boron internal component or did you mean to use this code in the application that uses it?
What are the chances of this bug being fixed?
All react components need to support isomorphic apps... thus be able to be rendered on the server.
What gives?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants