├── src ├── index.css ├── custom hooks.js ├── props.js ├── usememo child.js ├── usecontextpage2.js ├── usecallback child.js ├── usecontextpage3.js ├── child3.js ├── custom hooks │ ├── usefunction1.js │ └── custom hook1.js ├── App.css ├── import custom hooks.js ├── usereducerfn1.js ├── usecontext2.js ├── usecontext1.js ├── usecontext page1.js ├── index.js ├── usememo parent.js ├── usecallback parent.js ├── usecontext3.js ├── reactememo parent.js ├── App.js ├── usereducer1.js ├── usememo │ └── usememo parent.js ├── usreducerfunc.js ├── react memo child.js ├── machine task rating.js └── usereducer.js ├── public ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── manifest.json └── index.html ├── .gitignore ├── package.json └── README.md /src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-h-d-salih/react-hooks/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-h-d-salih/react-hooks/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-h-d-salih/react-hooks/HEAD/public/logo512.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/custom hooks.js: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | const useColor=()=>{ 4 | const [color,setColor]=useState('red'); 5 | return [color,setColor]; 6 | } 7 | export default useColor; -------------------------------------------------------------------------------- /src/props.js: -------------------------------------------------------------------------------- 1 | const Some=(props)=>{ 2 | 3 | return( 4 | <> 5 |