4 ms·
Out of interest, what was your reason for doing so? I’ve done a lot of React projects and only once tried Preact, several years ago when we hit some performance
by tomduncalf 6y ago
Out of interest, what was your reason for doing so? I’ve done a lot of React projects and only once tried Preact, several years ago when we hit some performance issues IIRC (it didn’t help).
- eyelidlessness 6y agoOut of sheer morbid curiosity about how far I could go with optimization. Preact was to be the first step, but the eventual goal was to try to use static analysis to only mount dynamic runtime code that had potential for state change, and make the rest truly static. For the site in question, everything except a hamburger menu could have been reduced to HTML and never touched by any DOM code, and it felt bonkers to ship the same content as JSX. It’s been a while so I don’t remember if Preact was part of that effort or just a separate optimization step that seemed like it should be low hanging fruit.