Change the eye toggle button in Login Page

param-code/counter-app·October 29, 2024·✅ Merged

Login form password toggle needed optimization with useCallback to prevent unnecessary re-renders and improve UI interaction.

This was a GSSoC (GirlScript Summer of Code) contribution to the counter-app project. The login form's password visibility toggle was causing unnecessary re-renders because the togglePasswordVisibility function was recreated on every render. This PR optimized it by wrapping the function with useCallback to prevent unnecessary re-renders, improving overall form performance.

Additional changes included styling refinements for the password input and eye icon with hover effects and borders for better visual clarity, integrated error messages for each form field to improve user feedback during validation, and debugging instructions for developers if the password visibility toggle fails. The PR was accepted as part of Hacktoberfest 2024 and GSSoC Extended, labeled as level1.

GitHub
LinkedIn
LeetCode