import React from 'react';

@@ -9,19 +9,1672 @@
 eact
- from 'react'
+, %7B Component %7D from 'react';%0Aimport computeLayout from 'css-layout';%0A%0Afunction Layout( layout ) %7B%0A  return DecoratedComponent =%3E class LayoutContainer extends Component %7B%0A    constructor( props ) %7B%0A      super( props );%0A      this.layout = %7B style: layout %7D;%0A    %7D%0A%0A    render() %7B%0A      return (%0A        %3CDecoratedComponent%0A          %7B...this.props%7D%0A          %7B...this.state%7D%0A        /%3E%0A      );%0A    %7D%0A  %7D;%0A%7D%0A%0A@Layout(%7B%0A  height: 40,%0A  alignSelf: 'stretch'%0A%7D)%0Aclass Rect extends Component %7B%0A  render() %7B%0A    const style = Object.assign(%7B%0A      position: 'absolute',%0A      backgroundColor: this.props.color%0A    %7D, this.props.style );%0A%0A    return %3Cdiv style=%7Bstyle%7D%3E%7BMath.random()%7D%3C/div%3E;%0A  %7D%0A%7D%0A%0Aconst colors = %5B%0A  '#f00',%0A  '#0f0',%0A  '#00f'%0A%5D;%0A%0Aclass App extends Component %7B%0A  constructor() %7B%0A    super();%0A    this.children = %5B%5D;%0A  %7D%0A%0A  componentDidMount() %7B%0A    this.forceUpdate();%0A  %7D%0A%0A  render() %7B%0A    const layout = %7B%0A      style: %7B%0A        padding: 20,%0A        width: 400,%0A        height: 200,%0A        justifyContent: 'space-between'%0A      %7D,%0A      children: this.children.map( child =%3E child.layout )%0A    %7D;%0A%0A    const style = Object.assign(%7B%0A      position: 'absolute',%0A      outline: '1px solid red'%0A    %7D, computeLayout( layout ) );%0A%0A    this.children = %5B%5D;%0A%0A    return (%0A      %3Cdiv className='app' style=%7Bstyle%7D%3E%0A        %7Bcolors.map( ( color, index ) =%3E%0A          %3CRect%0A            key=%7Bindex%7D%0A            color=%7Bcolor%7D%0A            style=%7Bstyle.children && style.children%5B index %5D%7D%0A            ref=%7Bcomponent =%3E this.children%5B index %5D = component%7D%0A          /%3E%0A        )%7D%0A      %3C/div%3E%0A    );%0A  %7D%0A%7D%0A%0AReact.render( %3CApp/%3E, document.querySelector( '.main' ) )
 ;%0A

Add initial layout test/hack.