Dmusketeer / React_Tutorial

React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React_Tutorial

What is React?

  • open Source library created by Facebook for building user interfaces
  • Not a FrameWork
  • React is a tool for building UI components
  • Rich Ecosystem

React DOM Render

  • The method ReactDom.render() is used to render (display) HTML elements

React Elements

  • React applications are usually built around a single HTML element.
  • React developers often call this the root node (root element)

React Components

  • React components are JavaScript functions.

What is JSX?

  • JSX stands for JavaScript XML.
  • JSX is an XML/HTML like extension to JavaScript.
  • Just like HTML, JSX tags can have a tag names, attributes, and children.
  • If an attribute is wrapped in curly braces, the value is a JavaScript expression.

Note that JSX does not use quotes around the HTML text string.

What is Babel?

  • Babel is a JavaScript compiler that can translate markup or programming languages into JavaScript.
  • React uses Babel to convert JSX into JavaScript.

what is diffrence between library and framework?

  • The main key difference between the Library and Framework is something known as inversion of control.
  • When you import a library, you have to call the specific methods or functions of your choice so, and it's up to you when and where to call the Library
  • Here, you are in charge of flow.
  • On the other hand, Framework itself makes a call to your code and provide you with some space to write down details.
  • So, while using framework your framework is in charge of flow.

Initial step:

  • create-react-app appname
    • cd appname
    • npm start

About

React


Languages

Language:JavaScript 55.5%Language:HTML 25.5%Language:CSS 19.0%