code: function(templateName, options) {
          var template = this.templates[templateName];
          if (!template) {
              throw new Error('Unknown template: ' + templateName);
          }
  
          if (typeof template === 'function') {
              var templateResult = template(options);
              return typeof templateResult === 'string' ? templateResult.trim() : templateResult;
          } else if (template.render) {
              return template.render(options).trim();
          } else {
              return template.toString().trim();
          }
      }
docs: Returns the result of the given template.
  
  @param templateName Name of the template to process.
  @param options Options to pass to the template.
  
  @return String containing HTML or ReactElement if template is a function returning
  ReactElement.