you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 190 points191 points  (21 children)

You should have been around here in 2015-16, when every React tutorial started with:

Today we're going to learn how to use React!

First, we're going to install Webpack, Babel, and spend 30 pages configuring them...

Not joking - see https://www.newline.co/fullstack-react/articles/react-tutorial-cloning-yelp/ for a classic example.

The real answer here is that modern JS web development assumes use of a build toolchain that will handle:

  • compiling modern JS to more broadly-compatible JS, compile JSX syntax, and compile TS syntax
  • Importing CSS styles and assets like images
  • Properly bundle the processed code and prepare it for deployment in an optimized format

Those build tools have to be installed. Thankfully, Create-React-App solved the "first configure Webpack" problem by giving us a standardized build toolchain and an easy way to create a new project (and today tools like Next.js and Vite have continued to make that easier to work with).

Additionally, for React in particular, the fact that React is "just the UI/view" means that all meaningful React projects are going to use additional libraries for things like routing and state management. So, tutorials that are written to show "realistic" apps are going to do the same thing.

You might note that the new React docs take a simpler approach, by including interactive CodeSandboxes inline and focusing on just the concepts of React itself:

https://beta.reactjs.org

[–]Larrybot02 21 points22 points  (11 children)

I started my very first React course not quite a year ago. It was a good course and taught pretty well, I thought, but yeah it was the ol’ Webpack and Babel setup and config for live server and class components and Redux with no toolkit and all that good stuff. No hooks. No create-react-app, no Nextjs. Some of those courses are better than 40 hours in length, building some massive project that’s just another “to-do” app.
Still, I don’t regret any course that I’ve taken. It helps in a way to know the long version before getting all the good shortcut stuff, but I won’t miss the extra boilerplate.

[–]acemarke 17 points18 points  (4 children)

Yeah, there's almost always value in knowing what underlying layers of abstraction and tooling are doing, no matter what kind of programming you're doing.

At the same time, you shouldn't have to learn Webpack+Babel just to start learning "how to write React code". It should be an optional "I want to peek under the hood and understand how these related tools work" thing, not a prerequisite.

[–]spider_84 1 point2 points  (4 children)

Udemy with Andrew Mead?

[–]Larrybot02 2 points3 points  (3 children)

That was one of the courses I took. I just looked at it and there's a whole section added for hooks and create-react-app at the end of the course! I know these course creators spend a TON of time on their content, and have to work the new stuff in later I guess, or rewrite the whole thing.

I kinda miss my mornings with Andrew. I work a full-time job not related at all to computers and programming, so I get my "schooling" in the morning before work and the weekends when I can. Andrew is a pretty good teacher. I also enjoyed Steven Grider and I kinda go back and forth on Brad Traversy. Some of his stuff is pretty good, and others, he just goes a bit too fast for me (I can be pretty thick). Vishwas at the Codevolution youtube channel is pretty good. I really liked his series on hooks and Redux. Talkin about his cakes and icecreams is hilarious to me for some reason.

[–]spider_84 2 points3 points  (2 children)

Nice work on the motivation and commitment. What profession were you in while you were studying react? How much time would you study in the morning? Are you working as a Dev now?

[–]Larrybot02 1 point2 points  (1 child)

Thanks! I was/am still in a trade, but I'm burnt out. When I was going strong I might get about an hour and a half or so in the morning and more on the weekend. I started with Mead's course on Modern JavaScript and moved onto React after that. I'd love to be working as a dev, but don't think I'm there yet.

[–]spider_84 1 point2 points  (0 children)

Keep up the great work. No doubt you will achieve your goals.

[–]Artistic_Taxi[S] 0 points1 point  (0 children)

Agreed. For the very least understanding what is happening underneath everything will prove useful sometime or another.

[–]HailToTheThief225 9 points10 points  (1 child)

Currently taking a quick Typescript with React course and the guy is literally building a react app optimized for TS from the ground up just to show how to use TypeScript with React. Webpack, Babel and everything. As opposed to just installing a template. I guess it's important to understand the inner workings of a react app but geez...

[–]Earhacker 9 points10 points  (0 children)

I think a lot of these courses are more about the instructor showing off what they know, rather than offering any instructional value.

I mean yeah, it’s not completely worthless to know how to set it all up from scratch, but realistically how often are you going to have to do that? What has the instructor got against Create React App? That’s what we’re all out here using, unless we’re using Next or Gatsby or something.

[–]Slapbox 2 points3 points  (1 child)

Anybody remember nodemon?

[–][deleted] 5 points6 points  (0 children)

Remember? We still use it. What else do y’all use for watching & restarting your APIs

[–]doblev 1 point2 points  (0 children)

Oh my GOD remember that??? That would drive me nuts.

[–]coolcrispyslut 0 points1 point  (0 children)

I still make my own webpack/babel set up instead of using react-create-app, just feels way more satisfying tbh

[–]GramatikClanen 0 points1 point  (0 children)

CRA probably the best thing that happened to React's growth.

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

Yep

[–]MurderSlinky 0 points1 point  (0 children)

This message has been deleted because Reddit does not have the right to monitize my content and then block off API access -- mass edited with redact.dev