4 ms·
> React is that the compilation step is almost required - and that compilation step is a significant and growing piece of friction. As a recovering C++ program
by zarzavat 1y ago
> React is that the compilation step is almost required - and that compilation step is a significant and growing piece of friction.
As a recovering C++ programmer the idea that a basically instant compilation step is a source of friction is hysterical to me.
Try waiting overnight for a build to finish. Frontend devs don't know they're born. It takes like 5 minutes to set up vite.
- port11 1y agoExactly, and I wouldn't miss a chance to give React some crap; when I was learning Java or Swift, the compilation times seemed horrendous. Web developers have it very good with fast incremental compilation, hot reload, etc.
- pbalau 1y agoThere is an extra thing that the people complaining about the compilation step in react are missing: using c++, for example, if you find an issue, you have to fix the issue, rebuild the thing, then run the thing and *do all the steps required to get your state to duplicate the issue*, just to check you fixed the issue. With react and the other js inspired frameworks and adjacent tooling, you just have to save the file.
- brazukadev 1y ago> With react and the other js inspired frameworks and adjacent tooling, you just have to save the file. React and TS people are making sure that is not the case anymore, allegedly for our own benefit.
- MrJohz 1y agoWith a bundler like Vite or TSX (not the same as the .tsx file extension), you really do just save the file, and everything reloads, usually instantaneously. That said, TS is now supported by default in NodeJS, Deno, and Bun, so if you're doing server-side stuff, you probably don't need a bundler at all, at least for development.
- brazukadev 1y agoESM is good enough that vite is not necessary anymore, typescript never was but it won't take longer for some people to come gaslit anybody not claiming it is the best thing to ever happen to web development.
- MrJohz 1y agoESM is good, but if you've got more than a few dozen files in a project, you're going to start running into performance issues with complex waterfalls where the browser can't start running a file until it's downloaded all the files it depends on, at which point it finds more files to download, and do on. Lots of projects don't need that amount of complexity, but the ones that do still need a bundler. And even if you don't have a project that big, a bundler can provide a lot of convenience by being able to, say, import different assets and have the bundler automatically provide the relevant URLs for use in the application. You're always trading off convenience for complexity here, but I find Vite and similar tools hit the sweet spot where they make my life easier without bringing in much complexity or overhead. Your experience might vary of course. Similarly with TypeScript, having worked with and without it, I get so much from it that is a no-brainer for me. But maybe I'm just in the pocket of Big TypeScript and this is more of that gaslighting you were worried about... ;)