Message Form Handling with Stimulus Discussion
Why not using stimulus data-action="keypress->conversation#submitForm" on text area instead of addEventListener?
Funny you should say that because in the next video (spoiler alert!), where we add some more stimulus, I refactor our code to do this but still with the keydown event.
It is better than putting the function call directly at the end of cookie clicker the body, because load event is guaranteed to fire after all resources are loaded.
Good point! Ensuring the load event fires after all resources are loaded definitely improves reliability.