We can't debounce the change handler as that would cause delay in UI update. However, yes, we can look into debouncing the password strength computation. Worth a look!
There could be multiple ways to do it. We can go for useMemo or useEffect for password strength computation. We can even do it outside useEffect too. Aim was to show one way to do it. Try with other ways and do share your solution with us!
Nice Video,
Only suggestion is you could have used Progress element.
32%
Thanks for the tip! 🙌
Thank you please keep uploading videos like this love to watch and lots of learning man
Great video as always. Thanks Yomesh for this content 😊
Glad to hear that! 😄
Brilliant! thanks for helping with my issue!
Glad it helped!
Great video. Could we have used debouncing here for the input instead of useEffect for calculating the strength?
We can't debounce the change handler as that would cause delay in UI update. However, yes, we can look into debouncing the password strength computation. Worth a look!
@@DevtoolsTech Why do we need useEffect here , change of password will re-render the component and can compute the styles outside the effect.
There could be multiple ways to do it. We can go for useMemo or useEffect for password strength computation. We can even do it outside useEffect too. Aim was to show one way to do it. Try with other ways and do share your solution with us!