code: function shouldBeStateless(definition, preferStateless) {
    if (!preferStateless) {
      return false;
    }
  
    if (runtime.isServer && (definition.getChildContext === undefined && definition.init === undefined)) {
      return true;
    }
  
    // Not stateless if contains anything more than render and static properties
    for (const prop in definition) {
      if (prop !== 'render' && !~STATIC_KEYS.indexOf(prop)) {
        return false;
      }
    }
  
    return true;
  }
docs: Determine if 'definition' is stateless
  @param {Object} definition
  @param {Boolean} preferStateless
  @returns {Boolean}