src/index.js
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;
}
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;
}
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 ; }
Determine if 'definition' is stateless
@param {Object} definition
@param {Boolean} preferStateless
@returns {Boolean}
Determine if definition is stateless