React js introduction



Download 462,25 Kb.
Sana29.05.2022
Hajmi462,25 Kb.
#614715
Bog'liq
React JS

REACT JS

Introduction

What is React?

  • The most popular JavaScript library
  • Renders your UI and responds to events
  • It also uses the concept called Virtual DOM, creates an in-memory data structure cache, enumerates theresulting differences, and then updates the browser’s displayed DOM efficiently
  • Used to create a UI (User Interface) components for Web and Mobile applications

React History

  • 2011 Created by Facebook programmer Jordan Walke
  • 2012 used Instagram, 2013 open-source
  • 2015 React Native was implemented

Features

  • Virtual DOM - Is faster than JS regular DOM
  • JSX (JavaScript eXtention) – HTML + JS
  • One-way communication flow – flux, redux
  • Use of State and Props
  • Single-Page programs are used

JSX

  • JSX (JavaScript eXtention) – HTML + JS
  • Easy and interactive - JavaScript code can be executed
  • const element =

    Hello, World! {4*10}

    ;

JSX



React.createElement{ ‘div’, {className: ‘hello’}, ‘Hello, World’};
Hello, World!
;

In plain JS, the initial user interface is generally created in HTML on the server. Meaning, HTML is dynamically created on the server, and might look something like this:

Grocery List

  • Milk
  • Bread
  • Eggs
  • In contrast, a React app will start with a fixed HTML file that looks like this:



    ...which is blank! So how does the UI get created?

    Instead of defining the initial UI on the server, the UI gets defined on the browser. So the app starts with a blank container (a div in this case), and then the UI gets loaded into that container.

    function GroceryList(props) {

    return (

    Grocery List

    • Milk
    • Bread
    • Eggs
    • )

      };

      Button is HTML

      Button is React JS

      Reference

      • React – A JavaScript library for building user interfaces (reactjs.org)
      • React vs. Plain JavaScript | Framer
      • React Tutorial (w3schools.com)
      • React — Википедия (wikipedia.org)
      • React.js: понятное руководство для начинающих / Хабр (habr.com)

      Download 462,25 Kb.

      Do'stlaringiz bilan baham:




      Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
      ma'muriyatiga murojaat qiling

      kiriting | ro'yxatdan o'tish
          Bosh sahifa
      юртда тантана
      Боғда битган
      Бугун юртда
      Эшитганлар жилманглар
      Эшитмадим деманглар
      битган бодомлар
      Yangiariq tumani
      qitish marakazi
      Raqamli texnologiyalar
      ilishida muhokamadan
      tasdiqqa tavsiya
      tavsiya etilgan
      iqtisodiyot kafedrasi
      steiermarkischen landesregierung
      asarlaringizni yuboring
      o'zingizning asarlaringizni
      Iltimos faqat
      faqat o'zingizning
      steierm rkischen
      landesregierung fachabteilung
      rkischen landesregierung
      hamshira loyihasi
      loyihasi mavsum
      faolyatining oqibatlari
      asosiy adabiyotlar
      fakulteti ahborot
      ahborot havfsizligi
      havfsizligi kafedrasi
      fanidan bo’yicha
      fakulteti iqtisodiyot
      boshqaruv fakulteti
      chiqarishda boshqaruv
      ishlab chiqarishda
      iqtisodiyot fakultet
      multiservis tarmoqlari
      fanidan asosiy
      Uzbek fanidan
      mavzulari potok
      asosidagi multiservis
      'aliyyil a'ziym
      billahil 'aliyyil
      illaa billahil
      quvvata illaa
      falah' deganida
      Kompyuter savodxonligi
      bo’yicha mustaqil
      'alal falah'
      Hayya 'alal
      'alas soloh
      Hayya 'alas
      mavsum boyicha


      yuklab olish