Your Generate Props example doesn’t show an equivalent comparison. You can spread multiple objects in JSX. You give the illusion that your Generate Props method is cutting out lines of code by not having to explicitly define each property of this.state and this.props. A more accurate comparison would be <MyComponent {...this.props} {...this.state} onPinch={this._onPinch} onPress={this._onPress} />.

Senior front end engineer / charlesstover.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store