Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Mohmed Ishak
Mohmed Ishak

Posted on • Edited on

     

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

importReactfrom'react';functiondelete(props){return(<div><h1>Hello,world!</h1></div>);}exportdefaultdelete;
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I'm Mohmed Ishak, a software engineer, and I know a bunch of stuffs about software engineering.
  • Location
    Malaysia
  • Joined

More fromMohmed Ishak

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp