threepointone/glamor

Empty style block on client render with hydration.

Closed this issue · 1 comments

Hello, I've started investigating using glamor and have come across an issue where if I SSR the styles and hydrate the ids on the client, glamor will still render a style block that is empty. Has anyone else seen this and is this a known issue. appending an empty style block to the DOM seems kind of wasteful to me, is this intended or am I doing something wrong?

screen shot 2017-05-23 at 18 14 49

Hydrate Code

var rehydrate = require('glamor').rehydrate;

rehydrate(window._glam);

var React = require('react');
var ReactDOM = require('react-dom');
var App = require('./index');

const props = window.props || {};

ReactDOM.render(<App {...props}/>, document.querySelector('[data-mount="default"]'));

It prepares the tag for any future styles to be inserted. not really wasteful, shouldn't affect anything. closing, feel free to reopen if it causes a problem.