Back

What is React


What is React?

The official React website states that: “React is a JavaScript library for building User Interfaces.”

Now, this is a nice statement, but what does it mean…? The first important point is the ‘JavaScript Library’ part. It is a JavaScript library.

It is about building JavaScript-driven apps. React apps run in the browser. They don’t run on the server and this gives us a great advantage. Things happen instantly since they happen in the user’s browser. We don’t have to wait for a server response to get a new page or to render something new.

The other important part of this statement is the ‘User Interfaces’ part. User Interfaces are basically what the user sees and React is all about using components for building these.

If you think about it, you can split up any web page into components. We could have a Header component, a Sidebar component and then a headline in the Article Content component.

Now, why is thinking like this important or useful?

Well, if we split up our web app or website into such components, we can build these building blocks (these components) as contained pieces of code. We don’t have to build our entire web page as one bigger picture. We can build all these tiny things on their own.

This, of course, makes working in teams easier. But even if we’re working alone, it makes it easy for us to keep our code manageable. If we change the headline, later on, we only have to go into that component and update it; we don’t have to find that code in our entire web page code.

We can also easily reuse components. For example, if we have a list item component and we want to output a list of these list items, then we only have to write the code once and can then easily reuse it.

React components can be thought of as custom HTML elements. In the end, you’re just writing custom HTML elements.

This is what React is about and it, therefore, solves the problem of having to build complex user interfaces with what HTML and JavaScript give you; by writing maintainable, manageable and reusable pieces of that code which you can throw into your web app wherever you need to use it.

img

What is kubernetes and why is it used?

Kubernetes is a word that you hear more and more these days as Containerization becomes more popular...

Buffer overflow for kids

A buffer, in terms of a program in execution, can be thought of as a region of computer’s main memory that has certain boundaries in context...

Get in touch_

Or just write me a letter here_