From the course: React: Creating and Hosting a Full-Stack Site

Why React?

"

- All right. So we're going to be starting off here by building the front end of our blog site using React. Now you may be wondering why we choose to use React instead of just creating our site using basic HTML, CSS and JavaScript. Well, React has a lot of advantages over hand coding a static site. And the main advantage is that it makes creating a website much simpler and faster without taking away any of the fine grained control from the programmer. All right. It allows us to create modular reusable components that can then be arranged into a fully functional website instead of hand coding each individual page in our site. So let's imagine for example that we have a blog site with hundreds or thousands or hundreds of thousands of articles such as Medium here. And let's say that we want to add something to all of our pages, right? Like an email signup form or in the case of Medium something that blocks users from reading articles after they've read three articles in a month. Well, if our site was just a static collection of HTML documents, what we'd have to do is actually have as many HTML documents as we had articles on our site. And if we wanted to make some sort of change, right? If we wanted to add a message up here saying this is your last free article, for example. Then what we would have to do is actually make that change across all of our HTML files which would be a very unpleasant and time intensive task. All right. So that's one of the main reasons that we use React is to make that sort of thing much easier. Now, the next question is why you'd use React over other platforms like WordPress or Wix or Squarespace that provide you with a more drag and drop approach to building websites usually without writing any code? Well, first of all, since this course is primarily aimed at developers, if you want to create a blog and you're not already a fairly strong developer, I would actually recommend that you use one of these platforms instead of React, since it'll probably end up being much more difficult for you in the long run, if you try and create a code based site with React if you haven't yet mastered basic coding. All right. So another question is why you choose React over other web libraries and frameworks like Angular or View? And the answer to this question is that it kind of depends on why you're asking, right? If you're trying to figure out which one of these React or Angular or View, or one of the many other front end libraries that are out there is best for you. Then I'd say that at the end of the day, the only way to really know for sure is to try all three. All right. Now, if you're trying to figure out which one you should learn for career reasons, however, I would strongly recommend React. Now, I'm not exactly sure what the actual statistics for this are. You're free to Google that for yourself, but personally I see a lot more companies using React than any of the other major front end libraries. Okay? So all that being said, React is a fantastic tool for programmers who want to create basically any type of web application. And with the advent of libraries like React Native it's rapidly becoming a tool for creating mobile apps as well. All right now, because of this React developers are currently very highly sought after and generally highly paid as well by companies who are looking to modernize their web apps or stay ahead of the curve. So with all of that knowledge, let's move on and see how we can quickly set up a React powered blog site.

Inhalt