ReactJS Tutorial

What is React and why it is used?
Is React backend or frontend?
What is React vs JavaScript?

reactjs is

A JavaScript library for building user interfaces

So it’s frontend.


React can also render on the server using Node and power mobile apps using React Native.

So React Native would be used on the backend

Here’s the official react site for more information:

No, but I’ll get to that.

React is a JavaScript library. So JS is the language - web browsers only understand HTML, CSS, and JS.

React is a library that makes it much, much easier to break your web site into small, manageable and reusable components. If you want to build or work on a large web site, nowadays something like React is almost certainly needed.

React is frontend because it deals with what happens in the browser.

There is a library called React Native (which is what I do) that allows you to use JS and React to build mobile apps and that translates into native code. But that is still not backend. Really, mobile is frontend, but it sometimes gets put into it’s own category of “mobile” because it doesn’t run in a browser.

React can also render on the server using Node and power mobile apps using React Native.

It is unclear what this means without context.

You usually work in a Node environment when developing a React (or React Native) app, but that doesn’t make it backend - because you aren’t building a server. You’re just using that environment for development and then you bundle everything to use on your frontend.

There is something called server side rendering (SSR) where you do some of the calculation for the web page is done on the server, before it is passed to the client (the browser). There are various advantages and disadvantages to this. Is it backend at that point? I would say not - I would say that you are using backend processes to process the frontend. (But I’m sure someone might disagree.) But there are ways to integrate your SSR and your backend that would blur the lines.

React does support SSR. But I wouldn’t worry about that for now - the first steps are just to learn React.

React is weird at first. It seems very confusing and overly complex. A lot of it will seem unnecessary since a lot of its strengths don’t come into play until the app becomes large. But if you want to do frontend professionally, I think you’re going to have to learn React or something like it.

1 Like