ReactDOMServer stops rendering on react-dimensions decorated components
aeneasr opened this issue · comments
I want to render a react app to a string and am using the ReadDOMServer to do so:
ReactDOMServer.renderToStaticMarkup(<EditorComponent store={this.props.store} id={this.props.id}` />)
However, I have a component that is wrapped by dimensions:
class Editable extends Component {
// ...
}
export default dimensions()(Editable)
With the dimensions decorator in there, the ReactDOMServer stops rendering all children there. Markup looks something like this:
<div>
<div style="width:100%;height:100%;padding:0;border:0;"></div>
</div>
while it should look something like this:
<div>
<div style="width:100%;height:100%;padding:0;border:0;">
<p> cool text </p>
</div>
</div>
Removing the dimensions()
decorator yields the desired result but breaks other logic that depends on dimensions:
<div>
<p> cool text </p>
</div>