Hanselminutes with Scott Hanselman cover image

The Web's Next Transition with Kent C. Dodds

Hanselminutes with Scott Hanselman

00:00

What Is Event PreventDefault?

The default behavior of the browser was to do a full page refresh between every single one of these links that you click on, every form that you submit. We don't want to have that full page refresh for modern apps. It just doesn't feel like a native app. So we prevent the default behavior. When a link is clicked on or a form is submitted, there's an event that's emitted before that actually takes place,. That's typically what most apps, Spas are doing today.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app