As part of my React learning journey, I spent Day 6 and 7 building a simple but powerful Password Generator App . This wasnβt just a UI exercise β it was a deep dive into React hooks, especially useCallback
, useEffect
, and useRef
.
What I Built
- Password length control
- Toggle numbers and special characters
- One-click copy to clipboard
- Auto-generate when options change
π Hooks I Focused On
useCallback
Memoized the password generation logic to avoid unnecessary re-renders β essential for optimization!
useEffect
Triggered re-renders when password settings changed. It was a great example of using useEffect
for side-effect orchestration.
useRef
Used to grab the generated password and copy it to clipboard β direct and clean!
π GitHub Repo
Let me know what you think or suggest improvements
Top comments (0)