Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook. Added babel-plugin-transform-class-properties as a Babel plugin.
This commit is contained in:
		
					parent
					
						
							
								44a3584e2d
							
						
					
				
			
			
				commit
				
					
						2991a7cfe6
					
				
			
		
					 79 changed files with 838 additions and 1128 deletions
				
			
		|  | @ -25,6 +25,13 @@ const mapStateToProps = state => ({ | |||
| 
 | ||||
| class Compose extends React.PureComponent { | ||||
| 
 | ||||
|   static propTypes = { | ||||
|     dispatch: PropTypes.func.isRequired, | ||||
|     withHeader: PropTypes.bool, | ||||
|     showSearch: PropTypes.bool, | ||||
|     intl: PropTypes.object.isRequired | ||||
|   }; | ||||
| 
 | ||||
|   componentDidMount () { | ||||
|     this.props.dispatch(mountCompose()); | ||||
|   } | ||||
|  | @ -76,11 +83,4 @@ class Compose extends React.PureComponent { | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| Compose.propTypes = { | ||||
|   dispatch: PropTypes.func.isRequired, | ||||
|   withHeader: PropTypes.bool, | ||||
|   showSearch: PropTypes.bool, | ||||
|   intl: PropTypes.object.isRequired | ||||
| }; | ||||
| 
 | ||||
| export default connect(mapStateToProps)(injectIntl(Compose)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue