Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createState_(comp, config) {
const ctor = comp.constructor;
comp.props = {};
comp.state = {};
const data = this.getManagerData(comp);
data.props_ = new State(comp.getInitialConfig(), comp.props, comp);
data.props_.configState(
object.mixin(
{},
config,
getStaticProperty(ctor, 'PROPS', State.mergeState)
)
);
this.addUnconfiguredProps_(comp, data.props_, comp.getInitialConfig());
data.state_ = new State({}, comp.state, comp);
data.state_.setEventData({
type: 'state',
});
data.state_.configState(State.getStateStatic(ctor));
}