from Hacker News

Show HN: I made a JavaScript library to turn MPA to SPA

by aidenyb on 5/2/22, 8:26 AM with 0 comments

I've always been fascinated by projects like Turbo Drive (formerly turbolinks), which attempt to bring Single Page (SPA) like navigation to Multi Page (MPA) web applications.

I recently shared my work on Million.js (https://github.com/aidenybai/million), which is a modern take on Virtual DOM.

Since Million.js internally uses a diffing algorithm, I decided to try and see if I could implement my own version of Turbo Drive, based on another diffing algorithm (micromorph).

Here's me integrating into an existing open source project: https://www.loom.com/share/ccd5429ddda04dfea882440b78ce61f2

It supports anchor tags, form submission, prefetching, and we're currently exploring more advance techniques with web workers and FLIP here! https://github.com/aidenybai/million/issues/177

I'm just really excited about this topic and I thought I'd share it to HN to see if any of you all have any suggestions :)