You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KKrzelowska edited this page Jan 6, 2021
·
4 revisions
Naming Variables:
We are using CamelCase.
Names should be descriptive enough so you don't have to leave comments in the code. Names should explain whats going on.
Importing modules:
First external modules like react, mobx, then modules from project.
Example:
import { toJS } from "mobx";
import Chart from "./components/Chart";
SOLID:
SRP -> Single Responsibility principle
Each module should have one and only one function and reason to change.
As modules depend on each other, it should be directly connected/intertwined with only one module.
DRY -> DO NOT REPEAT YOURSELF
The most important rule, that should be our guiding star.
The code should be written in a reusable components, so instead of repetition, we can just import once written module to fight redundancy of data.
Testing
For each new component we are writting tests that checks if it fulfills its specific task. Before committing changes, we are running tests by using command: