text: /**
   * Copyright 2014-present, Facebook, Inc.
   * All rights reserved.
   *
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   * @providesModule ReactServerNativeComponent
   */
  
  'use strict';
  
  var genericComponentClass = null;
  var textComponentClass = null;
  
  var ReactNativeComponentInjection = {
    // This accepts a class that receives the tag string. This is a catch all
    // that can render any kind of tag.
    injectGenericComponentClass: function injectGenericComponentClass(componentClass) {
      genericComponentClass = componentClass;
    },
    // This accepts a text component class that takes the text string to be
    // rendered as props.
    injectTextComponentClass: function injectTextComponentClass(componentClass) {
      textComponentClass = componentClass;
    }
  };
  
  /**
   * Get a native internal component class for a specific tag.
   *
   * @param {ReactElement} element The element to create.
   * @return {function} The internal class constructor function.
   */
  function createInternalComponent(element) {
    return new genericComponentClass(element.type, element.props);
  }
  
  /**
   * @param {ReactText} text
   * @return {ReactComponent}
   */
  function createInstanceForText(text) {
    return new textComponentClass(text);
  }
  
  /**
   * @param {ReactComponent} component
   * @return {boolean}
   */
  function isTextComponent(component) {
    return component instanceof textComponentClass;
  }
  
  var ReactNativeComponent = {
    createInternalComponent: createInternalComponent,
    createInstanceForText: createInstanceForText,
    isTextComponent: isTextComponent,
    injection: ReactNativeComponentInjection
  };
  
  module.exports = ReactNativeComponent;