From React to htmx on a real-world SaaS product: we did it, and it's awesome
youtube.com
youtube.com
https://htmx.org/essays/a-real-world-react-to-htmx-port/
- The effort took about 2 months (with a 21K LOC code base, mostly JavaScript)
- No reduction in the application's user experience
- They reduced the code base size by 67% (21,500 LOC to 7200 LOC)
- They increased python code by 140% (500 LOC to 1200 LOC), a good thing if you prefer python to JS
- They reduced their total JS dependencies by 96% (255 to 9)
- They reduced their web build time by 88% (40 seconds to 5)
- First load time-to-interactive was reduced by 50-60% (from 2 to 6 seconds to 1 to 2 seconds)
- Much larger data sets were possible when using htmx, because react simply couldn't handle the data
- Web application memory usage was reduced by 46% (75MB to 45MB)
I'm sorry to toot my own libraries horn, here, but these are great number that reflect the fact that the application they are building is very amenable to the hypermedia approach. Many applications being built are similarly amenable to this style of network architecture and would benefit from at least considering the htmx/hypermedia approach.