DEV Community

loading...

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

Collapse
nikhilroy2 profile image
Nikhil Chandra Roy Author

I want to use toggle inside myKey function see codesandbox.io/s/silent-bird-86li3

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.