Hacker News new | past | comments | ask | show | jobs | submit login

In the real world, you can use esbuild only.

You actually don't need hot reload or hot module replacement. esbuild is so fast you can just reload the page and it reloads instantly.

hot reload is really bad with slow bundlers. One of the projects I have to maintain at work has this hot reload feature. Here's how it goes: I edit a sass file, it recompiles in the background for 5 seconds, then reloads 4 or 5 times. Why? Who knows.




> You actually don't need hot reload or hot module replacement. esbuild is so fast you can just reload the page and it reloads instantly.

You don’t actually need any of these tools. But HMR is useful not because build time is slow (even if it often is), but because dev/validation iteration is slow too. TDD can improve some of that, but when you’re iterating on something interactive and want to validate the experience of it (or any number of other circumstances where manual validation provides value), having your setup state preserved can mean the difference between split second validation (with fast tooling) and completely breaking flow.


What do you mean by "dev/validation iteration"?


Say you're developing a big form with lots of different inputs. When you're iterating on the form you don't want to lose all your form state because you edited some code.

When you make the change you want to see what that change does to your form in its current state.


That's very true. I think the most frustrating thing (that I regularly see) is people trying to do a minor fix in a wizard (let's say on the 5th step) and going through every step again just to see if the bug was fixed. Things like HMR can help here.

That's why things like mock-service-worker or having prefilled Redux stores (or whatever state management you use that allows something similar) are a real time saver.

Of course fixing the bug based on test is always better, but often you have to fix something visual which is a little bit harder to do with tests.


In those situations I usually just write some throw away code so the application loads up in the desired state


Sounds like you have auto save on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: