-
Notifications
You must be signed in to change notification settings - Fork 1
Style Guide
Important note: everything which is not covered here should be covered with rules from this page - https://github.com/MetaCell/lunapark-dev/wiki/Linting
View name - PascalCase (ExampleForAViewName).
Container name - Same as for the view, but with Container
at the end of the name.
Files for classes - Name should be the same as for class.
Files for small components which are outside of redux infrastructure - partials.js
Creators and actions - filename: small letters and -
as separator
Class name - should represent what service do
Class name - should represent what class do
Reducers - filename: small letters and -
as separator, and scidash-
as a prefix
ID - small letters and -
as a separator
Class - small letters and -
as a separator
It's preferred to use classes instead of ID in case you do some styling, if you need to get DOM element from JS, you may mark it with ID.
Important - Don't write any logic in views, don't write any views in containers, if you need a small view for exclude it from the main view, use partials.js
If you need some custom logic - you may use\create service or shared class. In container only logic which can be used - it's just providing data for view, and methods (not necessary method should use redux dispatch
, it can be just a method for view)