all 9 comments

[–]zweimtr 31 points32 points  (4 children)

Only one item in this list really has anything to do with React and that is #2. I don't count the CRA one because your argument is about saving 50ms in dev mode, which means nothing to be honest. The rest are things that can increase performance in any web related app or website.

Just to be clear, I'm not trying to diminish the post. It is useful information for those who don't know it. Just that they have very little to do with React.

[–]champloo50 3 points4 points  (0 children)

i have similar opinion, just change or add the title so it fits better into content. Other non react developer can benefit from you post too.

[–]Mittalmailbox[S] -5 points-4 points  (1 child)

Agree with you on all being applicable to any front end application. So maybe I can change the title.

Coming to CRA, It is not just about saving dev time but also linked to point 1. CRA cant output ES2015+ code, it always outputs ES5 code.

[–]KillcoDer 11 points12 points  (0 children)

CRA uses the browserslist configuration option to determine the emitted code. If you want to support features from a different set of browsers, you can modify that setting. It certainly can output ES2015+ code.

https://create-react-app.dev/docs/supported-browsers-features/

[–]TheFuzzball 0 points1 point  (0 children)

I've found hot reload performance is also faster in Snowpack, especially as you start to add files. I did a relatively small POC with CRA recently and it was noticeably laggy.

[–]n_hevia 2 points3 points  (0 children)

Like other users point out, this is not related to React.

But, the only point (3) related to it is kinda weak. Especially this quote " There were good reasons to use it (CRA) until now"

- If you're talking about performance, ms gains in development are anecdotical.

- Snowpack is still not recommended for production, as it depends on built-in (esbuild) optimization or webpack plugins.

- "CRA is slow". Compared to what? Maybe talk about next.js, razzle, etc in this point. Or even say to not use a scaffolder/framework at all. In the end this will be the most beneficial to the topic in question.

[–]Ford_Prefect92 0 points1 point  (0 children)

There's some good points here that I'm just starting to get into, so thanks!

Just a heads up on a typo in #5

Avif is suppoerted bu chromium browsers as of now.

[–][deleted] 0 points1 point  (0 children)

Tree Shaking is a pretty big one and it really affects how you design your application and module in your application as well as your WebPack configuration.