But the above code does not result in the form element functioning correctly. The html disappears from the preview panel and errors are thrown in the console. (I don’t fully understand why “event” doesn’t seem accessible in the nested function, but this isn’t a curriculum help request.)
But the proper solution actually uses something like:
Although we learned it in a previous challenge, I understand this should be used to capture state and props, however why the form doesn’t work with it? And yes I tried it and the tests passed! Although the html not working and I’m getting errors in the console as you said, I need to understand.