Can someone give me an explanation about React?

Hello, guys!

I know that React is a JS front-end framework.

What I do not know is what functionalities does React bring to front-end.

So:

  1. What can you do with React that you can’t with vanilla JS and CSS?
  2. Is React somehow related to the use of APIs? If so, how are APIs used in the front-end, aren’t they specific to the back-end?
  3. What exactly can you build with React?

That’s it.

Hi @anghelpaul99,

1. What can you do with React that you can’t with vanilla JS and CSS?

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable and easier to debug.

You can absolutely do everything with vanilla js but React and its ecosystem makes it easier to build complex UIs.

2. Is React somehow related to the use of APIs? If so, how are APIs used in the front-end, aren’t they specific to the back-end?

An application programming interface ( API ) is a computing interface that defines interactions between multiple software intermediaries.

As you can see from the WIKI, it is an interface. For example, a server can return API endpoints(interface) that return some form of JSON, a React component can return properties(interface) that you can communicate with. So no, it is applicable not only to servers.

Another example with vanilla js - you can build a JS class that will handle some important logic, this class will expose methods that you can use to interact with this class. You can also consider it as API.

3. What exactly can you build with React?

With React you can easily build complex web interfaces, and with React Native you can build iOS and Android apps.

Thank you very much!

1 Like