replaced deprecated transferpropsto with {...this.props}