JoystreamClassic / joystream-node

Node bindings for joystream libtorrent extension
MIT License
0 stars 3 forks source link

Standard on export default #21

Closed rllola closed 7 years ago

rllola commented 7 years ago

We sometime use export default in front of the class definition and sometime at the end of the file. I think we can agree to always use it at the same place.

Example 1 :

export default class ClassName extends Components {
  // ...
}

Example 2 :

class ClassName extends Components {
  // ...
}
export default ClassName

I prefer at the end of the file like in example 1 because in front of the class we often use decorators like @observer and @inject and it start to make it hard to read.

mnaamani commented 7 years ago

Yes I did use the first approach in one or two places, and now I see its not very clear.

Agreed we should follow one style, and I also now prefer exporting at the end of the file.