Closed Jinnified closed 8 years ago
looks like you can not access any build in js object such as window or document in react's render methods
I can't understand the problem totally, did you mean how you should work with window
object in boilerplate?
There're only two places in boilerplate that modify window
object
Also remember that this boilerplate isomorphic (universal) and if you want to work with browser objects such as navigator
, window
, and etc. you should work with them in componentDidMount
component method, check react documentation please
Anyway write here if your issue was resolved by my comment or not? If not please give me more details
yea, you were right, because of it's universal, so browser object can only be accessed post render stage, etc, didMount, didUpdate, etc
but dont know if it can be made not hanging when those objects are been accessed, say, in render() or componentWillMount()
@Jinnified I will add a note in README.md
perhaps for this moment
Hi
It seems that in any react component, whenever you try to access 'window', even in console log, then you try to refresh, the server will starts hanging, looks like this window obj been overwritten by the backend?