 
 NewNotebookComponent = React.createClass
   displayName: 'NewNotebookComponent'
-  render: ->
+  mixins: [AppAwareMixin]
+  render: ->
+    {imports, module_names} = @context.app
     intro_command = Settings.get 'app', 'intro_command'
     if intro_command? and intro_command != ''
-      SingleCoffeeScriptCellNotebookComponent {value: intro_command}
+      SingleCoffeeScriptCellNotebookComponent {app: @context.app, value: intro_command}
     else
       Notebook.NotebookComponent {imports, module_names, init: (nb) ->
         Notebook.focus_cell Notebook.add_input_cell nb


HelpComponent = React.createClass
  displayName: 'HelpComponent'
  mixins: [Router.Navigation]
  run: (value) ->
    @transitionTo 'raw_notebook', splat: btoa value
  navigate: (key) ->
    @transitionTo 'help', {key}
  render: ->
    # TODO don't lie about class. fix the stylesheet to apply
    React.DOM.div {className: 'help output'},
      Context.TopLevelContextComponent {imports, module_names, context: {run: @run, docs_navigate: @navigate}},


SingleCoffeeScriptCellNotebookComponent = React.createClass
  displayName: 'SingleCoffeeScriptCellNotebookComponent'
  mixins: [AppAwareMixin]
  render: ->
    value = @props.value
    {imports, module_names} = @context.app
    Notebook.NotebookComponent {imports, module_names, init: (notebook) ->
      first_cell = Notebook.add_input_cell notebook
      Notebook.set_cell_value first_cell, value
