DEV Community

Mohmed Ishak
Mohmed Ishak

Posted on • Edited on

1

What's React.js (For Absolute Beginners)?

Alt Text

Hello. I know that you've stumbled upon the term "React" hella lot of times so I'm here to explain that to you assuming you know nothing about React.

React is a JavaScript library to build UI. All web applications have a frontend (UI/anything that you can see).

The Traditional Way to Build UI

Use HTML (for page structure), CSS (for styling) and JavaScript (for interactive behaviors).

One Major Problem

To make complex functionalities/interactive behaviors such as converting kilogram (kg) to gram (g) using JavaScript, we need to manipulate the DOM element which can be difficult and needs us to write more code which can pollute the codebase.

What Will Happen If I Use React?

You will write way less code and you don't need to manipulate the DOM directly. The whole idea of React is to provide an abstraction over the DOM so you can focus on end product without unnecessary complexity.

Any Other Cool Stuffs About React?

A whole lot.

  • Fast (thanks to virtual DOM)
  • Has super large community
  • Ease of learning (because it's not a framework or complete solution, but just a library)
  • You can write HTML inside React components using something called JSX expressions (JavaScript XML) so there is no need for a HTML file
  • etc.

Example React Code

import React from 'react';

function delete(props) {
  return (
    <div>
      <h1>Hello, world!</h1>
    </div>
  );
}

export default delete;
Enter fullscreen mode Exit fullscreen mode

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay