Open aluxian opened 9 years ago
There is a hacky fix
const isBrowser = typeof window !== 'undefined';
render() {
let spinner;
if(isBrowser) {
var Loader = require('halogen/ScaleLoader');
spinner = ( <Loader color={this.props.colour} size={this.props.size} margin={this.props.margin} />);
} else {
spinner = (<div></div>);
}
return (
<div>
{spinner}
</div>
);
};
+1
Waiting for https://github.com/yuanyan/domkit/pull/7
I am using webpack and server pre-rendering. Halogen tries to access
document
and the server crashes:I'd love to use it, but I can't.. is there a quick fix for this or would you have to take a deeper look and change how things work inside the components?