Mobx is the only popular JavaScript library that I know about which uses decorators. They put things on the same line so we should follow their conventions. The logic implemented here is the following: if there is one decorator, it's on the same line. If there is more than one, they are each on their own line. Fixes #325
6 lines
182 B
JavaScript
6 lines
182 B
JavaScript
@connect(mapStateToProps, mapDispatchToProps)
|
|
export class MyApp extends React.Component {}
|
|
|
|
@connect(state => ({ todos: state.todos }))
|
|
export class Home extends React.Component {}
|