     html = React.createClass
       render: -> React.DOM.div className: 'user-html', dangerouslySetInnerHTML: __html: @props.value
 
-    fn 'text', 'Prints text', (string) ->
-      @add_component text value: string
+    component_fn 'text', 'Prints text', (string) ->
+      text value: string
 
-    fn 'pre', 'Prints preformatted text', (string) ->
-      @add_component pre value: string
+    component_fn 'pre', 'Prints preformatted text', (string) ->
+      pre value: string
 
-    fn 'html', 'Adds some HTML', (string) ->
-      @add_component html value: string
+    component_fn 'html', 'Adds some HTML', (string) ->
+      html value: string
 
     ErrorComponent = React.createClass
       render: -> React.DOM.pre {className: 'error'}, @props.message
 
-    fn 'error', 'Shows a preformatted error message', (message) ->
-      @add_component ErrorComponent {message}
+    component_fn 'error', 'Shows a preformatted error message', (message) ->
+      ErrorComponent {message}
 
     example = React.createClass
       render: -> React.DOM.div {className: 'example', onClick: @on_click}, @transferPropsTo source()

    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

            React.DOM.td {}, command.doc
          ]

    component_cmd 'keys', 'Shows the key bindings', ->
      all_keys = {}
      # TODO some commands are functions instead of names
      build_map = (map) ->
