     else
       target.textContent = code
 
+  FunctionDocumentationComponent = React.createClass
+    render: ->
+      React.DOM.dl {}, _.map @props.fns, (fn) ->
+        [
+          React.DOM.dt {}, fn.name
+          React.DOM.dd {}, fn.doc
+        ]
+
   help = (fns) ->
     documented_fns = (name for name, c of fns when c?.doc?)
     documented_fns.sort()
-    $dl = $ '<dl/>'
-    for cmd in documented_fns
-      $tt = $ '<tt/>'
-      $tt.text cmd
-      $dt = $ '<dt/>'
-      $dt.append $tt
-      $dl.append $dt
-      $dd = $ '<dd/>'
-      $dd.text fns[cmd].doc
-      $dl.append $dd
-    $dl
+    FunctionDocumentationComponent fns: _.map documented_fns, (name) -> {name, doc: fns[name].doc}
 
   modules.create 'builtins', ({fn, cmd}) ->
     cmd 'help', 'Shows this help', (cmd) ->

    fn 'html', 'Adds some HTML', (string) ->
      @add_component html value: string

    fn 'error', 'Shows a preformatted error message', (message) ->
      $pre = $ '<pre class="error"/>'
      $pre.text message
      @add_rendered $pre

    example = React.createClass
      render: -> React.DOM.div {className: 'example', onClick: @on_click}, @transferPropsTo source()

        _.extend @current_options, options
      @value @current_options

    LinkComponent = React.createClass
      render: -> React.DOM.a {href: @props.href}, @props.value

    cmd 'permalink', 'Create a link to the code in the input cell above', (code) ->
      a = document.createElement 'a'
      # TODO app should generate links
      a.href = location.href
      a.hash = null
      code ?= @previously_run()
      a.search = '?' + encodeURIComponent btoa code
      @add_component LinkComponent href: a.href, value: a.href

    fn 'websocket', 'Runs commands from a web socket', (url) ->
      ws = new WebSocket url
