What is React

Estimated reading time: 1 minute

What is React ?

React is a popular JS library . It is a declarative, efficient, and flexible library for building UI .

Who maintain React?

React is maintained by Facebook Community . Main author Jordan Walke, Denis Popov

When first release React?

  • React Initial release in March 2013

Official React .

JSX data access

{} this is JSX system for all task

props

import Sidebar from './something'
var users = {
  name: 'kamal',
  age: 25,
  password: 1234
}
<Sidebar users={users}>
//or
<Sidebar users={this.state.users}>

access props

<h1>{this.props.users.name}</h1>
  • props type package by react/facebook https://reactjs.org/docs/typechecking-with-proptypes.html

props children

<Sidebar>
  <h1> This is children props </h1>
</sidebar>
  • access by {this.props.children} inside Sidebar component .

  • css - js propertis https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference

Reference

path active

https://www.youtube.com/watch?v=XVdwq8W2ZsM&list=PLoYCgNOIyGABj2GQSlDRjgvXtqfDxKm5b&index=8


const aboutActive = location.pathname.match(/^\/about)? "active" : "" ;

react, react.js, js