       vars: vars
       imported_vars: imported_vars
 
-  render = (o) ->
-    o._lead_render()
-
-  delayed_then_immediate_renderable_list_builder = ->
-    $item = $ '<div/>'
-    renderables = []
-    rendered = false
-    add_renderable: (renderable) ->
-      if rendered
-        $item.append render renderable
-      else
-        renderables.push renderable
+  render = (renderable) ->
+    wrapper = document.createElement 'div'
+    component = component_for_renderable renderable
+    React.renderComponent component, wrapper
+    $ wrapper
+
+  is_component = (o) -> o?._lifeCycleState?
+
+  is_renderable = (o) ->
+    o? and (is_component(o) or o._lead_render?)
+
+  renderable_component = React.createClass
+    render: -> React.DOM.div()
+    componentDidMount: (node) -> $(node).append @props.renderable._lead_render()
+
+  component_list = React.createClass
+    getInitialState: -> components: @components
+    add_component: (c) ->
+      @components ?= []
+      @components.push c
+      @setState components: @components if @state
     empty: ->
-      renderables.length = 0
-      $item.empty()
-    _lead_render: ->
-      unless rendered
-        rendered = true
-        children = _.map renderables, render
-        $item.append children
-      $item
+      @components = []
+      @setState components: @components if @state
+    render: ->
+      React.DOM.div {}, @state.components
+
+  component_for_renderable = (renderable) ->
+    if is_component renderable
+      renderable
+    else if is_component renderable._lead_render
+      renderable._lead_render
+    # TODO remove context special case
+    else if renderable.renderable_list_builder?
+      renderable.renderable_list_builder
+    else
+      renderable_component {renderable}
 
   create_run_context = (extra_contexts) ->
     result_handlers =[

    run_in_context,
    eval_coffeescript_in_context,
    eval_in_context,
    render,
    scope,
    collect_extension_points
  }

      # creates a nested context, adds it to the renderable list, and applies the function to it
      nested_item: (fn, args...) ->
        nested_context = @create_nested_renderable_context()
        @add_component nested_context.renderable_list_builder
        nested_context.apply_to fn, args

      display_object: (object) ->
