Closed pavankalyan-codes closed 2 years ago
This is an anti-pattern in react! It is not recommended todo dom-manipulation with
document.___
in react. Any time you have to manipulate a node, we do it usingrefs
; that's the react way.Here we already have a function defined
isGuestNameClick(e)
when we press the button. Why don't you call that function on Keydown? You need to add some more types to the function definition to stop typescript from giving you errors.
Thanks for the comments. made changes according to it. Pls review them and merge if everything looks fine.
Thanks LGTM! 🎉
@all-contributors please add @pavankalyan-codes for code
@Rishabh-malhotraa
I've put up a pull request to add @pavankalyan-codes! :tada:
closes 52