voorhoede / riotjs-style-guide

Opinionated RiotJS Style Guide for teams.
Creative Commons Zero v1.0 Universal
287 stars 22 forks source link

Another approach for "Put tag properties and methods on top" #64

Open amitguptagwl opened 6 years ago

amitguptagwl commented 6 years ago

I found a practical issue with this approach. When you tag file becomes longer it is difficult to track what is defined above. Specially when you refactor and change the method name.

So I use this way to create methods. Now if I need to refactor, I need to change only on one place. And my editor also doesn't complaint.

tag.moveStart = function ( knotName ){ .. }