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
				
			
		|  | @ -18,6 +18,15 @@ const messages = defineMessages({ | |||
| 
 | ||||
| class Account extends ImmutablePureComponent { | ||||
| 
 | ||||
|   static propTypes = { | ||||
|     account: ImmutablePropTypes.map.isRequired, | ||||
|     me: PropTypes.number.isRequired, | ||||
|     onFollow: PropTypes.func.isRequired, | ||||
|     onBlock: PropTypes.func.isRequired, | ||||
|     onMute: PropTypes.func.isRequired, | ||||
|     intl: PropTypes.object.isRequired | ||||
|   }; | ||||
| 
 | ||||
|   constructor (props, context) { | ||||
|     super(props, context); | ||||
|     this.handleFollow = this.handleFollow.bind(this); | ||||
|  | @ -81,13 +90,4 @@ class Account extends ImmutablePureComponent { | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| Account.propTypes = { | ||||
|   account: ImmutablePropTypes.map.isRequired, | ||||
|   me: PropTypes.number.isRequired, | ||||
|   onFollow: PropTypes.func.isRequired, | ||||
|   onBlock: PropTypes.func.isRequired, | ||||
|   onMute: PropTypes.func.isRequired, | ||||
|   intl: PropTypes.object.isRequired | ||||
| } | ||||
| 
 | ||||
| export default injectIntl(Account); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue