News for hackers. Stuff that matters.
Re:What Is React: A Visual Introduction for Beginners by dimitrios1 on Thursday February 04, 2021 @09:44AM (#26025695)
CRA is one way to get a very opinionated starter kit, but like all boilerplates and toolkits, they are very tailored to one particular use case, and you never learn what is possible with the library outside of the toolkit. Breaking from the happy path of the toolkit yields an even more frustrating experience than if you had set it all up by yourself. (Ejecting anything above a medium-complexity SPA from CRA is painful)

For example, on the reactjs.docs, https://reactjs.org/docs/create-a-new-react-app.html, create-react-app is simply one of four toolkits recommended, along with countless others in open source land.

Re:What Is React: A Visual Introduction for Beginners by duxup on Thursday February 04, 2021 @11:00AM (#26026506)
>are very tailored to one particular use case

What is that one use case? What are the others that don't fit?

Re:What Is React: A Visual Introduction for Beginners by amenod on Thursday February 04, 2021 @10:04AM (#26025874)
In practice though, unless you have some very specific needs (and the people I have met who thought that they did, well,... didn't :) ), you should still "just use CRA".

There are folks who like to live on the bleeding edge, and for those using something else (or ejecting) might even make sense... maybe. But for any production app you should just use CRA, otherwise you will find yourself explaining to your new hire all the obscure choices you made a year or two ago. Believe me, I've been on the receiving end of these explanations and it sucks.

Re:What Is React: A Visual Introduction for Beginners by codingdave on Thursday February 04, 2021 @10:17AM (#26026001)
I've been on the other end of that story, where entire dev organizations freak out because of a concern with webpack, babel, or some other piece of the stack... and nobody knows how to fix it.

CRA has its place, certainly. But it is a black box, and somebody in your org should know the tools well enough to make good decisions to build up a product from scratch without CRA... and then you may still choose to use CRA, but it is an educated choice, not a default answer because you do not know any other options.

Re:What Is React: A Visual Introduction for Beginners by sli on Thursday February 04, 2021 @10:59AM (#26026498)
I agree with it being important to know how to do this stuff from scratch (with Google, let's be realistic), but the black box problem is solved by ejecting.
Re:What Is React: A Visual Introduction for Beginners by kingdomcome50 on Thursday February 04, 2021 @11:21AM (#26026753)
Have you ever ejected a CRA? If you think your problems are about to be solved after doing the above... I have a bridge to sell you.
Re:What Is React: A Visual Introduction for Beginners by fabioborellini on Thursday February 04, 2021 @10:47AM (#26026322)
My excuse for longing for something non-CRA is updating an existing frontend to React piece by piece. To integrate it with the existing Django app’s asset pipeline, I kind of had to eject and now my Webpack configuration and its dependencies are completely out of control. I am considering starting over with another tool chain, copying the existing components to the new structure. Replacing the whole thing with a new SPA would not have been feasible.
Re:What Is React: A Visual Introduction for Beginners by wilsonrocks on Thursday February 04, 2021 @11:53AM (#26027138)
We have a project we unejected to CRA. Or maybe injected...
Re:What Is React: A Visual Introduction for Beginners by madeofpalk on Thursday February 04, 2021 @11:07AM (#26026598)
I don't think CRA is particularly opinionated, at least for the common scenario of "I want to make a react website". It doesnt force you down many (if any) routes, or prevent you from using too many popular technologies.

Yes, 100%, if you have more exotic requirements from a bundler or build toolchain then you'll need to look elsewhere and probably have to start learning tools like Webpack in more detail. I try and avoid those requirements.

Re:What Is React: A Visual Introduction for Beginners by timw4mail on Thursday February 04, 2021 @11:21AM (#26026755)
It's SOOOOOOO slow, though.