•	React
•	React class component
•	class car extends react.component
class car extends React.Component{
render(){
return <h2> hi car </h2>
}
}

•	Constructor 
class car extends React.Component{
constructor(){
super();
this.state = {color:"Red"}
}
render(){
return <h2> Hi i am car </h2>
}
}

Hooks
useState();
const [state , setState] = useState();
when you want to change the state of any variable you can use it and change it with setstate method ();
useEffect();
useContext(); => use of context api  => when you have complex tree of component   it will make a function globally  , you can use any function from any component 
const NoteState = (props) =>{
const s1 = {
name: "dikshant",
age : "22"
}
const [state, setState] =useState(s1);
const update = () =>{
setTimeout(()=>{
setState({
"name" : "dc",
"age":"20"
})
},1000);
}
return (
<NoteContext.Provider value = {{state :state , Update: Update))>
{props.childern}
</NoteContext.Provider>
)}
useRef(); = > when you don't want change a varible value , even the website reload