Dividing the work
Split a big product into small parts with clear borders. Then several people can work at the same time without getting in each other's way.
modules/hanna-css/src/css/ -basics.css.ts Alert.css.ts ButtonPrimary.css.ts ButtonSecondary.css.ts … over 100 more modules/hanna-react/src/ ButtonPrimary.tsx ButtonSecondary.tsx …
Every component has its own CSS source file, and the React package has a matching component file. Changing the Alert means opening one file.
github.com/rvk-utd/hanna ↗Every component is a folder with four files:
- Button/Button.tsxthe React component
- Button/Button.css.tsthe styles
- Button/Button.stories.tsxwhat Storybook shows
- Button/Button.spec.tsxtests
One person can own the Button folder, write its story and its tests, and never touch anyone else's code.
In your project: split the work by component, not by page. “You make Button and Card, I make Header” works. “You make the front page, I make the about page” ends with two different buttons.