DEV Community


Discussion on: How to use toggle outside of class component render and toggle inside variable reactjs?

nikhilroy2 profile image
Nikhil Chandra Roy Author

I want to use toggle inside myKey function see

when I hit enter after type some text I need the click button toggle but the toggle not working, I will appreciate you if you try to fix it.