import React from 'react'
import {setupNonObservables, setupObservables, removeObservables} from '../internal/ContainerHelpers'
export default class DangerouslySlowContainer extends React.Component {
constructor(props, __dangerouslyEnableSlowness) {
super(props)
this.__dangerouslyEnableSlowness = __dangerouslyEnableSlowness || true
}
componentWillMount() {
setupNonObservables(this, this.props, false)
setupObservables(this, this.props, this.props.children.type.defaultProps)
}
componentWillReceiveProps(nextProps) {
if (this.__dangerouslyEnableSlowness) {
removeObservables(this)
setupNonObservables(this, nextProps, false)
setupObservables(this, nextProps, this.props.children.type.defaultProps)
}
}
componentWillUnmount() {
removeObservables(this)
}
render() {
return {
type: this.props.children.type,
['$$typeof']: Symbol.for('react.element'),
props: {...this._nonObservables, ...this.state}
}
}
}
h