Skip to main content Accessibility Feedback

Refactoring a vanilla JS app with state based UI

About a year ago, I recorded myself building a simple vanilla JS in real time in under 20 minutes.

One of my students mentioned that he would like to see a video of me refactoring code live. Today, I put together a video of me refactoring my Who’s Driving app to use state-based UI instead of lots of manual DOM manipulation.

Note: I should have added a function to sanitize user inputs to protect against XSS attacks. Totally forgot to!

Here’s the video.

And here are the related assets: