Use early returns for gates.
Use functions for complicated "getters" (this is actually a move beyond their "getTheme" or "getDashboard" kinda examples".
Dont use complex nested of ternary or null coalescence.
Ie. Write readable code, not code golf.
Has some good examples of what not to do.