React basic concepts

1) It is a library

2) JSX

const RootElement = (
<div>
<h1 style={{color: white}}>Hello World</h1>
<p>Hi, There</p>
</div>
)ReactDOM.render(RootElement, document.getElementById('app'))
const rootElement =
React.createElement(‘div’, {},
React.createElement(‘h1’, {style: {color: ‘white’}},
‘Hello World’),
React.createElement(‘p’, {},
‘Hi, There’)
)ReactDOM.render(rootElement, document.getElementById(‘app’))

3)Dom

4)Hooks

5)React Components

6)Props

import React from 'react';


const nav = (props) => {
return (
<div>
<h1>{props.headerProp}</h1>
<h2>{props.contentProp}</h2>
</div>
);
}

export default nav;

7)State

8)Context API

9)Optimization

10)Webpack

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store