Extract page logic into custom hooks
- Lingua principale
- JavaScript
- Stelle
- 2
- Fork
- 14
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Several page level components currently contain complex state management and side effect logic directly within their bodies. This violates the [separation of concerns](https://www.freecodecamp.org/news/separation-of-concerns-react-container-and-presentational-components/) principle, making the components bloated and hard to maintain.
Below is an initial list of refactoring tasks and potential custom hooks
#### Pages to Refactor
- [ ] **Home page:** Extract animation logic and `useRef` hooks.
- [ ] **About page:** Move `useRef` logic to the Hero component or a dedicated hook.
- [ ] **Team page:** Extract animation variants and `useRef` hooks.
- [ ] **Gallery page:** Move `useRef` and `useRouter` logic into a custom hook.
- [ ] **Clublife page:** Extract animation variants into a shared location.
#### Suggested Custom Hooks to Create
- [ ] `useScrollDirection` (for Navbar)
- [ ] `useNavbarColor` (for Navbar)
- [ ] `useOnClickOutside` (for MenuDrawer)
- [ ] `useScrollVisibility` (for ScrollDown)
- [ ] `useResponsiveGrid` (for MembersAndAlumni)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.