Vite Hot Module Replacement

I was doing a Vite demo last week, I changed some markup, and visited the local web server. The markup changed, but the state persisted. What?! This is Vite&rsquo;s Hot Module Replacement API.