MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / Klass

Function Klass

src/createClass.js:83–88  ·  view source on GitHub ↗
(props, context)

Source from the content-addressed store, hash-verified

81 let mixins = specMixins.concat(spec)
82 spec.mixins = null
83 function Klass(props, context) {
84 Component.call(this, props, context)
85 this.constructor = Klass
86 spec.autobind !== false && bindContext(this, Klass.prototype)
87 this.state = this.getInitialState() || this.state
88 }
89 Klass.displayName = spec.displayName
90 let proto = Klass.prototype = new Facade()
91 proto.$getInitialStates = []

Callers

nothing calls this directly

Calls 2

bindContextFunction · 0.85
getInitialStateMethod · 0.80

Tested by

no test coverage detected