- Don't be blinded by
DRYprincipleTODO: add comments
- Add comments - only if it's required
- Describe props/types
type TreeItem = {
/** Unique identifier */
id: TreeNodeId;
/** Name */
name: string;
/** Amount of related items */
count: number;
/** Parent identifier */
parentId?: TreeNodeId;
}- Use
tsdoc-like style
/**
* Tooltip
* @remark If you should not specify `title` props - tooltip'll be invisible
*/
const Tooltip = (props: Props) => {- Use
cssvars- specially - with work with colors
- not only on app level, also at component's level
.app {
--clr-base: #4d97fd;
--clr-base-hover: #4d97fd1f;
...
}