├── .gitignore ├── To-Do-List.gif ├── react-redux-typescript-template ├── src │ ├── react-app-env.d.ts │ ├── setupTests.ts │ ├── index.css │ ├── App.test.tsx │ ├── app │ │ └── store.ts │ ├── index.tsx │ ├── App.css │ ├── logo.svg │ ├── features │ │ └── counter │ │ │ ├── Counter.module.css │ │ │ ├── Counter.tsx │ │ │ └── counterSlice.ts │ ├── App.tsx │ └── serviceWorker.ts ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── .gitignore ├── tsconfig.json ├── package.json └── README.md ├── react-redux-template ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── app │ │ └── store.js │ ├── setupTests.js │ ├── App.js │ ├── index.css │ ├── App.test.js │ ├── index.js │ ├── App.css │ ├── features │ │ └── counter │ │ │ ├── Counter.module.css │ │ │ ├── counterSlice.js │ │ │ └── Counter.js │ └── serviceWorker.js ├── .gitignore ├── README.md └── package.json ├── React-Hooks-with-Boostrap-Kit ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── Routers │ │ ├── history.js │ │ ├── ScrollToTopRoute.js │ │ └── index.js │ ├── assets │ │ └── images │ │ │ ├── logo.png │ │ │ ├── Banner │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ └── 4.jpg │ │ │ └── ameenalam.jpg │ ├── App.js │ ├── App.test.js │ ├── component │ │ ├── footer │ │ │ └── index.js │ │ ├── home │ │ │ ├── index.js │ │ │ └── Card │ │ │ │ └── index.js │ │ ├── componentState │ │ │ ├── Child │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── header │ │ │ └── index.js │ │ ├── banner │ │ │ └── index.js │ │ ├── LifeCycle │ │ │ └── index.js │ │ ├── contact │ │ │ └── index.js │ │ └── about │ │ │ └── index.js │ ├── index.css │ ├── 404.js │ ├── App.css │ ├── index.js │ └── serviceWorker.js ├── README.md ├── package.json └── LICENSE ├── react-redux-app ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── reducers │ │ ├── index.js │ │ └── users.js │ ├── middleware │ │ ├── index.js │ │ └── logger.js │ ├── setupTests.js │ ├── App.test.js │ ├── actions │ │ └── users.js │ ├── index.css │ ├── App.js │ ├── App.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── .gitignore ├── README.md └── package.json ├── react-router-dom ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── pages │ │ ├── index.js │ │ ├── 404.js │ │ ├── example4 │ │ │ └── index.js │ │ ├── example3 │ │ │ └── index.js │ │ ├── example1 │ │ │ └── index.js │ │ └── example2 │ │ │ └── index.js │ ├── OAuth │ │ ├── login │ │ │ └── index.js │ │ └── register │ │ │ └── index.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── App.js │ └── serviceWorker.js ├── .gitignore ├── package.json └── README.md ├── react-template ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── App.js │ ├── App.css │ ├── logo.svg │ └── serviceWorker.js ├── .gitignore ├── README.md └── package.json ├── react-context-api-hooks ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── setupTests.js │ ├── App.js │ ├── App.test.js │ ├── components │ │ ├── teachers │ │ │ ├── index.js │ │ │ └── teachers-list.js │ │ └── students │ │ │ ├── index.js │ │ │ └── students-list.js │ ├── index.css │ ├── index.js │ ├── App.css │ ├── contexts │ │ └── ContextProvider.js │ ├── logo.svg │ └── serviceWorker.js ├── .gitignore ├── package.json └── README.md ├── react-material-ui-contentful ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── setupTests.js │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── Components │ │ ├── NavBar │ │ │ └── index.js │ │ ├── Course │ │ │ └── index.js │ │ └── CourseList │ │ │ └── index.js │ ├── App.css │ ├── logo.svg │ └── serviceWorker.js ├── .gitignore ├── package.json └── README.md ├── Ecommerce-App └── README.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | build 4 | 5 | 6 | -------------------------------------------------------------------------------- /To-Do-List.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/To-Do-List.gif -------------------------------------------------------------------------------- /react-redux-typescript-template/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /react-redux-template/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /react-redux-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-router-dom/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-template/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-context-api-hooks/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-material-ui-contentful/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-redux-typescript-template/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react-redux-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-app/public/favicon.ico -------------------------------------------------------------------------------- /react-redux-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-app/public/logo192.png -------------------------------------------------------------------------------- /react-redux-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-app/public/logo512.png -------------------------------------------------------------------------------- /react-template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-template/public/favicon.ico -------------------------------------------------------------------------------- /react-template/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-template/public/logo192.png -------------------------------------------------------------------------------- /react-template/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-template/public/logo512.png -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/Routers/history.js: -------------------------------------------------------------------------------- 1 | import { createBrowserHistory } from "history"; 2 | export default createBrowserHistory(); -------------------------------------------------------------------------------- /react-router-dom/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-router-dom/public/favicon.ico -------------------------------------------------------------------------------- /react-router-dom/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-router-dom/public/logo192.png -------------------------------------------------------------------------------- /react-router-dom/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-router-dom/public/logo512.png -------------------------------------------------------------------------------- /react-redux-template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-template/public/favicon.ico -------------------------------------------------------------------------------- /react-redux-template/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-template/public/logo192.png -------------------------------------------------------------------------------- /react-redux-template/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-template/public/logo512.png -------------------------------------------------------------------------------- /react-context-api-hooks/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-context-api-hooks/public/favicon.ico -------------------------------------------------------------------------------- /react-context-api-hooks/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-context-api-hooks/public/logo192.png -------------------------------------------------------------------------------- /react-context-api-hooks/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-context-api-hooks/public/logo512.png -------------------------------------------------------------------------------- /react-material-ui-contentful/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-material-ui-contentful/public/favicon.ico -------------------------------------------------------------------------------- /react-material-ui-contentful/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-material-ui-contentful/public/logo192.png -------------------------------------------------------------------------------- /react-material-ui-contentful/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-material-ui-contentful/public/logo512.png -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/public/favicon.ico -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/public/logo192.png -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/public/logo512.png -------------------------------------------------------------------------------- /react-redux-app/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import users from './users' 3 | 4 | export default combineReducers({ 5 | users, 6 | }) -------------------------------------------------------------------------------- /react-redux-typescript-template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-typescript-template/public/favicon.ico -------------------------------------------------------------------------------- /react-redux-typescript-template/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-typescript-template/public/logo192.png -------------------------------------------------------------------------------- /react-redux-typescript-template/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/react-redux-typescript-template/public/logo512.png -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/logo.png -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/1.jpg -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/2.jpg -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/3.jpg -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/Banner/4.jpg -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/assets/images/ameenalam.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ameen-Alam/PIAIC-React-Assignment/HEAD/React-Hooks-with-Boostrap-Kit/src/assets/images/ameenalam.jpg -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Routers from './Routers/index.js' 3 | import './App.css'; 4 | 5 | function App() { 6 | return 7 | } 8 | export default App; -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/README.md: -------------------------------------------------------------------------------- 1 | # React-Hooks-with-Boostrap-Kit 2 | 3 | #### Start Project 4 | 5 | ``` $ npm install ``` or ``` $ yarn ```
6 | ``` $ npm start ``` or ``` $ yarn start ``` 7 | -------------------------------------------------------------------------------- /react-redux-app/src/middleware/index.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware } from 'redux' 2 | import thunk from 'redux-thunk' 3 | import logger from './logger' 4 | 5 | export default applyMiddleware( 6 | thunk, 7 | logger, 8 | ) 9 | -------------------------------------------------------------------------------- /react-router-dom/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Home = () => { 4 | return ( 5 |
6 | HOME 7 |
8 | ) 9 | } 10 | 11 | export default Home; -------------------------------------------------------------------------------- /react-router-dom/src/OAuth/login/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | const Login = () => { 5 | return ( 6 |
7 |

Login

8 |
9 | ) 10 | } 11 | 12 | export default Login; -------------------------------------------------------------------------------- /react-router-dom/src/OAuth/register/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | const Register = () => { 5 | return ( 6 |
7 |

Register

8 |
9 | ) 10 | } 11 | 12 | export default Register; -------------------------------------------------------------------------------- /react-redux-template/src/app/store.js: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit'; 2 | import counterReducer from '../features/counter/counterSlice'; 3 | 4 | export default configureStore({ 5 | reducer: { 6 | counter: counterReducer, 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /react-router-dom/src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Component = () => { 4 | return ( 5 |
6 |

Hey! You just hit a page that doesn't exist...

7 |
8 | ) 9 | } 10 | 11 | export default Component; -------------------------------------------------------------------------------- /react-redux-app/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-template/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-router-dom/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-redux-template/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import NavBar from './Components/NavBar' 3 | import CourseList from './Components/CourseList' 4 | 5 | function App() { 6 | return ( 7 |
8 | 9 | 10 |
11 | ); 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /react-redux-template/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Counter } from './features/counter/Counter'; 3 | import './App.css'; 4 | 5 | function App() { 6 | return ( 7 |
8 | Counter 9 | 10 |
11 | ); 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/component/footer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | const Footer = () => { 5 | return ( 6 |
7 | COPYRIGHT © 2020 PANACLOUD - ALL RIGHTS RESERVED. 8 |
9 | ) 10 | } 11 | 12 | 13 | export default Footer; -------------------------------------------------------------------------------- /react-redux-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /react-router-dom/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /react-template/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from 'react'; 2 | import Students from './components/students' 3 | import Teachers from './components/teachers' 4 | 5 | const App = () => { 6 | 7 | return ( 8 | 9 | 10 | 11 | 12 | ); 13 | } 14 | 15 | export default App; -------------------------------------------------------------------------------- /react-context-api-hooks/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /react-redux-app/src/middleware/logger.js: -------------------------------------------------------------------------------- 1 | const logger = (store) => (next) => (action) => { 2 | console.group(action.type) 3 | console.log('The action: ', action) 4 | const returnValue = next(action) 5 | console.log('The new state: ', store.getState()) 6 | console.groupEnd() 7 | 8 | return returnValue 9 | } 10 | 11 | export default logger -------------------------------------------------------------------------------- /react-router-dom/src/pages/example4/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useRouteMatch } from "react-router-dom"; 3 | 4 | 5 | const Example4 = () => { 6 | 7 | const match = useRouteMatch('/react-router-hook/use-route-match '); 8 | 9 | return match ?

{match.params.name}'s Profile

:

My own profile

; 10 | 11 | } 12 | 13 | export default Example4; -------------------------------------------------------------------------------- /react-router-dom/src/pages/example3/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useParams } from "react-router-dom"; 3 | 4 | 5 | const Example3 = () => { 6 | 7 | const { slug } = useParams(); 8 | return ( 9 |
10 |

react-router-hook/useParams

11 | Param {slug} 12 |
13 | ) 14 | } 15 | 16 | export default Example3; -------------------------------------------------------------------------------- /react-redux-app/src/reducers/users.js: -------------------------------------------------------------------------------- 1 | import { RECIEVE_USERS } from '../actions/users' 2 | 3 | export default function users(state = { name: 'Ameen' }, action) { 4 | switch (action.type) { 5 | case RECIEVE_USERS: 6 | return { 7 | ...state, 8 | ...action.users 9 | } 10 | default: 11 | return state 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /react-redux-app/src/actions/users.js: -------------------------------------------------------------------------------- 1 | export const RECIEVE_USERS = 'RECIEVE_USERS' 2 | 3 | export function recieveUsers(users) { 4 | // with redux 5 | // return { 6 | // type: RECIEVE_USERS, 7 | // users, 8 | // } 9 | 10 | // with redux thunk 11 | return (dispatch) => { 12 | dispatch({ 13 | type: RECIEVE_USERS, 14 | users, 15 | }) 16 | } 17 | } -------------------------------------------------------------------------------- /react-redux-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react-router-dom/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react-template/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/Routers/ScrollToTopRoute.js: -------------------------------------------------------------------------------- 1 | import { Component } from 'react'; 2 | import { withRouter } from 'react-router-dom'; 3 | class ScrollToTop extends Component { 4 | componentDidUpdate(prevProps) { 5 | if (this.props.location !== prevProps.location) { 6 | window.scrollTo(0, 0) 7 | } 8 | } 9 | render() { 10 | return this.props.children 11 | } 12 | } 13 | 14 | export default withRouter(ScrollToTop) -------------------------------------------------------------------------------- /react-context-api-hooks/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react-redux-app/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-router-dom/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-template/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/components/teachers/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | // import Provider 4 | import { TeachersContextProvider } from '../../contexts/ContextProvider' 5 | 6 | import TeachersList from './teachers-list' 7 | 8 | 9 | 10 | const Teachers = () => { 11 | 12 | return ( 13 | 14 | 15 | 16 | ); 17 | } 18 | 19 | export default Teachers; -------------------------------------------------------------------------------- /react-context-api-hooks/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/components/students/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | // import Provider 4 | import { StudentsContextProvider } from '../../contexts/ContextProvider' 5 | 6 | 7 | import StudentsList from './students-list' 8 | 9 | 10 | 11 | const Students = () => { 12 | 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | 20 | export default Students; -------------------------------------------------------------------------------- /react-material-ui-contentful/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-redux-template/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react-redux-template/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-redux-typescript-template/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-redux-template/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import { Provider } from 'react-redux'; 4 | import store from './app/store'; 5 | import App from './App'; 6 | 7 | test('renders learn react link', () => { 8 | const { getByText } = render( 9 | 10 | 11 | 12 | ); 13 | 14 | expect(getByText(/learn/i)).toBeInTheDocument(); 15 | }); 16 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import { Provider } from 'react-redux'; 4 | import { store } from './app/store'; 5 | import App from './App'; 6 | 7 | test('renders learn react link', () => { 8 | const { getByText } = render( 9 | 10 | 11 | 12 | ); 13 | 14 | expect(getByText(/learn/i)).toBeInTheDocument(); 15 | }); 16 | -------------------------------------------------------------------------------- /react-router-dom/src/pages/example1/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useHistory } from "react-router-dom"; 3 | 4 | 5 | const Example1 = () => { 6 | 7 | let history = useHistory() 8 | 9 | const handleClick = () => { 10 | history.push("/"); 11 | } 12 | 13 | return ( 14 |
15 |

react-router-hook/use-history

16 | 17 |
18 | ) 19 | } 20 | 21 | export default Example1; -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | width: 100%; 9 | font-size: 100%; 10 | overflow-x: hidden; 11 | } 12 | ul.tabs li::selection, nav li>a::selection, img::selection, .badges > li::selection { background: none; } 13 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/app/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit'; 2 | import counterReducer from '../features/counter/counterSlice'; 3 | 4 | export const store = configureStore({ 5 | reducer: { 6 | counter: counterReducer, 7 | }, 8 | }); 9 | 10 | export type RootState = ReturnType; 11 | export type AppThunk = ThunkAction< 12 | ReturnType, 13 | RootState, 14 | unknown, 15 | Action 16 | >; 17 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/component/home/index.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from 'react' 2 | import Banner from '../banner' 3 | import Card from './Card' 4 | 5 | const Home = () => { 6 | return ( 7 | 8 | 9 | 14 | 15 | 16 | ) 17 | } 18 | 19 | 20 | export default Home; -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/404.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Notfound() { 4 | return ( 5 |
6 |
7 |
8 |

404

9 |

Sorry, this URL does not exist or is no longer available.

10 |

Perhaps you were looking for one of the following sections:

11 |
12 |
13 |
14 | ) 15 | } 16 | 17 | 18 | export default Notfound; -------------------------------------------------------------------------------- /react-redux-app/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | import './App.css'; 3 | import { connect } from 'react-redux' 4 | import { recieveUsers } from './actions/users' 5 | 6 | function App(props) { 7 | 8 | useEffect(() => { 9 | props.dispatch(recieveUsers({ lastName: "Alam" })) 10 | }, []) 11 | return ( 12 |
13 | {props.users.name} {props.users.lastName} 14 |
15 | ); 16 | } 17 | 18 | function mapStateToProps({ users }) { 19 | return { 20 | users 21 | } 22 | } 23 | 24 | 25 | export default connect(mapStateToProps)(App); -------------------------------------------------------------------------------- /react-template/README.md: -------------------------------------------------------------------------------- 1 | # React-Template 2 | 3 | React. js is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It's used for handling the view layer for web and mobile apps. React also allows us to create reusable UI components. 4 | 5 | 6 | ### cra-template 7 | 8 | ``` $ npx create-react-app my-app ```
9 | ``` $ cd my app ```
10 | ``` $ npm start ``` 11 | 12 | 13 | #### Start Project 14 | 15 | ``` $ npm install ``` or ``` $ yarn ```
16 | ``` $ npm start ``` or ``` $ yarn start ``` -------------------------------------------------------------------------------- /react-router-dom/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react-template/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/App.css: -------------------------------------------------------------------------------- 1 | img{ max-width: 100%; } 2 | .logo { 3 | width: 80px; 4 | } 5 | 6 | .footer { 7 | background: #4b9c32; 8 | text-align: center; 9 | position: relative; 10 | z-index: 1; 11 | } 12 | 13 | .height1 { 14 | min-height: 86vh; 15 | display: flex; 16 | justify-content: center; 17 | align-items: center; 18 | text-align: center; 19 | } 20 | 21 | .style1 { 22 | background-color: grey; 23 | padding: 5px; 24 | list-style: none; 25 | margin: 5px 0; 26 | } 27 | ul{ 28 | margin: 0; 29 | padding: 0; 30 | } 31 | .ameenalam{ width: 120px; } -------------------------------------------------------------------------------- /react-template/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-redux-app/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-router-dom/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-context-api-hooks/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-redux-typescript-template/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "noEmit": true, 20 | "jsx": "react" 21 | }, 22 | "include": [ 23 | "src" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-material-ui-contentful/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-redux-template/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/Components/NavBar/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AppBar from '@material-ui/core/AppBar' 3 | import Toolbar from '@material-ui/core/Toolbar' 4 | import Typography from '@material-ui/core/Typography' 5 | const NavBar = () => { 6 | return ( 7 |
8 | 9 | 10 | 11 | React & Material-UI Sample Application 12 | 13 | 14 | 15 |
16 | ) 17 | } 18 | 19 | export default NavBar; -------------------------------------------------------------------------------- /react-redux-typescript-template/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/components/students/students-list.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react' 2 | 3 | // import context 4 | import { Context } from '../../contexts/ContextProvider' 5 | 6 | 7 | const StudentsList = () => { 8 | // use context 9 | const { students } = useContext(Context) 10 | console.log(students, "students") 11 | return ( 12 |
13 |

Students List

14 |
    15 | {students.map((val, key) => ( 16 |
  • {val.name} {val.class}
  • 17 | ))} 18 |
19 |
20 | ) 21 | } 22 | 23 | export default StudentsList; -------------------------------------------------------------------------------- /react-context-api-hooks/src/components/teachers/teachers-list.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react' 2 | 3 | // import context 4 | import { Context } from '../../contexts/ContextProvider' 5 | 6 | 7 | const TeachersList = () => { 8 | // use context 9 | const { teachers } = useContext(Context) 10 | console.log(teachers, "teachers") 11 | return ( 12 |
13 |

Teachers List

14 |
    15 | {teachers.map((val, key) => ( 16 |
  • {val.name} {val.class}
  • 17 | ))} 18 |
19 |
20 | ) 21 | } 22 | 23 | export default TeachersList; -------------------------------------------------------------------------------- /react-template/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | function App() { 6 | return ( 7 |
8 |
9 | logo 10 |

11 | Edit src/App.js and save to reload. 12 |

13 | 19 | Learn React 20 | 21 |
22 |
23 | ); 24 | } 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/component/componentState/Child/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Child = (props) => { 4 | let cssprop = { 5 | color: "#ddd" 6 | } 7 | return ( 8 |
    9 | { 10 | props.value.map((text, key) => { 11 | return ( 12 |
  • 13 | {text} 14 |
  • 15 | ) 16 | }) 17 | } 18 |
19 | ) 20 | } 21 | 22 | export default Child; -------------------------------------------------------------------------------- /react-redux-app/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react-redux-template/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import store from './app/store'; 6 | import { Provider } from 'react-redux'; 7 | import * as serviceWorker from './serviceWorker'; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | 13 | 14 | , 15 | document.getElementById('root') 16 | ); 17 | 18 | // If you want your app to work offline and load faster, you can change 19 | // unregister() to register() below. Note this comes with some pitfalls. 20 | // Learn more about service workers: https://bit.ly/CRA-PWA 21 | serviceWorker.unregister(); 22 | -------------------------------------------------------------------------------- /react-template/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react-context-api-hooks/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react-material-ui-contentful/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import { store } from './app/store'; 6 | import { Provider } from 'react-redux'; 7 | import * as serviceWorker from './serviceWorker'; 8 | 9 | ReactDOM.render( 10 | 11 | 12 | 13 | 14 | , 15 | document.getElementById('root') 16 | ); 17 | 18 | // If you want your app to work offline and load faster, you can change 19 | // unregister() to register() below. Note this comes with some pitfalls. 20 | // Learn more about service workers: https://bit.ly/CRA-PWA 21 | serviceWorker.unregister(); 22 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import 'bootstrap/dist/js/bootstrap.bundle.min'; 4 | import 'bootstrap/dist/css/bootstrap.min.css'; 5 | import 'font-awesome/css/font-awesome.min.css'; 6 | import "slick-carousel/slick/slick.css"; 7 | import "slick-carousel/slick/slick-theme.css"; 8 | import App from './App'; 9 | import './index.css'; 10 | import * as serviceWorker from './serviceWorker'; 11 | 12 | ReactDOM.render(, document.getElementById('root')); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react-redux-template/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-float infinite 3s ease-in-out; 13 | } 14 | } 15 | 16 | .App-header { 17 | min-height: 100vh; 18 | display: flex; 19 | flex-direction: column; 20 | align-items: center; 21 | justify-content: center; 22 | font-size: calc(10px + 2vmin); 23 | } 24 | 25 | .App-link { 26 | color: rgb(112, 76, 182); 27 | } 28 | 29 | @keyframes App-logo-float { 30 | 0% { 31 | transform: translateY(0); 32 | } 33 | 50% { 34 | transform: translateY(10px) 35 | } 36 | 100% { 37 | transform: translateY(0px) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /react-redux-app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | import { createStore } from 'redux' 8 | import { Provider } from 'react-redux' 9 | 10 | import reducer from './reducers' 11 | import middleware from './middleware' 12 | 13 | const store = createStore(reducer, middleware) 14 | 15 | ReactDOM.render( 16 | 17 | 18 | , 19 | document.getElementById('root') 20 | ); 21 | 22 | // If you want your app to work offline and load faster, you can change 23 | // unregister() to register() below. Note this comes with some pitfalls. 24 | // Learn more about service workers: https://bit.ly/CRA-PWA 25 | serviceWorker.unregister(); 26 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-float infinite 3s ease-in-out; 13 | } 14 | } 15 | 16 | .App-header { 17 | min-height: 100vh; 18 | display: flex; 19 | flex-direction: column; 20 | align-items: center; 21 | justify-content: center; 22 | font-size: calc(10px + 2vmin); 23 | } 24 | 25 | .App-link { 26 | color: rgb(112, 76, 182); 27 | } 28 | 29 | @keyframes App-logo-float { 30 | 0% { 31 | transform: translateY(0); 32 | } 33 | 50% { 34 | transform: translateY(10px) 35 | } 36 | 100% { 37 | transform: translateY(0px) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /react-router-dom/src/pages/example2/index.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react' 2 | import { useLocation, useHistory } from "react-router-dom"; 3 | 4 | const Example2 = () => { 5 | 6 | const location = useLocation(); 7 | 8 | useEffect(() => { 9 | const currentPath = location.pathname; 10 | const searchParams = new URLSearchParams(location.search); 11 | console.log(location, "location") 12 | console.log(currentPath, "currentPath") 13 | console.log(searchParams, "searchParams") 14 | }, [location]); 15 | 16 | const history = useHistory() 17 | const handleClick = () => { 18 | history.push('use-location:slug') 19 | } 20 | 21 | return ( 22 |
23 |

react-router-hook/useLocation

24 | 25 |
26 | ) 27 | } 28 | 29 | export default Example2; -------------------------------------------------------------------------------- /react-template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-template", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "react": "^16.13.1", 10 | "react-dom": "^16.13.1", 11 | "react-scripts": "3.4.1" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "test": "react-scripts test", 17 | "eject": "react-scripts eject" 18 | }, 19 | "eslintConfig": { 20 | "extends": "react-app" 21 | }, 22 | "browserslist": { 23 | "production": [ 24 | ">0.2%", 25 | "not dead", 26 | "not op_mini all" 27 | ], 28 | "development": [ 29 | "last 1 chrome version", 30 | "last 1 firefox version", 31 | "last 1 safari version" 32 | ] 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /react-redux-template/README.md: -------------------------------------------------------------------------------- 1 | # React-Redux-Template 2 | 3 | Redux is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. ... You can use Redux together with React, or with any other view library. 4 | 5 | 6 | ### cra-template-redux 7 | 8 | ``` $ npx create-react-app my-app --template redux ```
9 | ``` $ cd my app ```
10 | ``` $ npm start ``` 11 | 12 | 13 | #### Start Project 14 | 15 | ``` $ npm install ``` or ``` $ yarn ```
16 | ``` $ npm start ``` or ``` $ yarn start ``` 17 | 18 | 19 | #### Redux Documentation 20 | 21 | 22 | https://redux.js.org/introduction/getting-started 23 | 24 | https://redux.js.org/introduction/installation 25 | 26 | https://react-redux.js.org/ 27 | 28 | https://redux-toolkit.js.org/ 29 | -------------------------------------------------------------------------------- /react-context-api-hooks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "context-and-hooks", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "react": "^16.13.1", 10 | "react-dom": "^16.13.1", 11 | "react-scripts": "3.4.1" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "test": "react-scripts test", 17 | "eject": "react-scripts eject" 18 | }, 19 | "eslintConfig": { 20 | "extends": "react-app" 21 | }, 22 | "browserslist": { 23 | "production": [ 24 | ">0.2%", 25 | "not dead", 26 | "not op_mini all" 27 | ], 28 | "development": [ 29 | "last 1 chrome version", 30 | "last 1 firefox version", 31 | "last 1 safari version" 32 | ] 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /react-router-dom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-router-dom", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "react": "^16.13.1", 10 | "react-dom": "^16.13.1", 11 | "react-router-dom": "^5.2.0", 12 | "react-scripts": "3.4.1" 13 | }, 14 | "scripts": { 15 | "start": "react-scripts start", 16 | "build": "react-scripts build", 17 | "test": "react-scripts test", 18 | "eject": "react-scripts eject" 19 | }, 20 | "eslintConfig": { 21 | "extends": "react-app" 22 | }, 23 | "browserslist": { 24 | "production": [ 25 | ">0.2%", 26 | "not dead", 27 | "not op_mini all" 28 | ], 29 | "development": [ 30 | "last 1 chrome version", 31 | "last 1 firefox version", 32 | "last 1 safari version" 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /react-material-ui-contentful/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-material-ui", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.10.2", 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "contentful": "^7.14.4", 11 | "react": "^16.13.1", 12 | "react-dom": "^16.13.1", 13 | "react-scripts": "3.4.1" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test", 19 | "eject": "react-scripts eject" 20 | }, 21 | "eslintConfig": { 22 | "extends": "react-app" 23 | }, 24 | "browserslist": { 25 | "production": [ 26 | ">0.2%", 27 | "not dead", 28 | "not op_mini all" 29 | ], 30 | "development": [ 31 | "last 1 chrome version", 32 | "last 1 firefox version", 33 | "last 1 safari version" 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /react-redux-app/README.md: -------------------------------------------------------------------------------- 1 | # React-Redux-App 2 | 3 | Redux is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. ... You can use Redux together with React, or with any other view library. 4 | 5 | 6 | #### cra-template 7 | 8 | ``` $ npx create-react-app my-app ```
9 | ``` $ cd my app ```
10 | ``` $ npm install --save redux ```
11 | ``` $ npm install --save react-redux ```
12 | ``` $ npm install --save redux-thunk ```
13 | 14 | ``` $ npm start ``` 15 | 16 | 17 | #### Start Project 18 | 19 | ``` $ npm install ``` or ``` $ yarn ```
20 | ``` $ npm start ``` or ``` $ yarn start ``` 21 | 22 | 23 | #### Redux Documentation 24 | 25 | https://redux.js.org/introduction/getting-started 26 | 27 | https://redux.js.org/introduction/installation 28 | 29 | https://react-redux.js.org/ 30 | 31 | https://redux-toolkit.js.org/ 32 | -------------------------------------------------------------------------------- /react-redux-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-redux-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "react": "^16.13.1", 10 | "react-dom": "^16.13.1", 11 | "react-redux": "^7.2.0", 12 | "react-scripts": "3.4.1", 13 | "redux": "^4.0.5", 14 | "redux-thunk": "^2.3.0" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": "react-app" 24 | }, 25 | "browserslist": { 26 | "production": [ 27 | ">0.2%", 28 | "not dead", 29 | "not op_mini all" 30 | ], 31 | "development": [ 32 | "last 1 chrome version", 33 | "last 1 firefox version", 34 | "last 1 safari version" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /react-redux-template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-redux-template", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@reduxjs/toolkit": "^1.1.0", 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "react": "^16.13.1", 11 | "react-dom": "^16.13.1", 12 | "react-redux": "^7.1.3", 13 | "react-scripts": "3.4.1" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test", 19 | "eject": "react-scripts eject" 20 | }, 21 | "eslintConfig": { 22 | "extends": "react-app" 23 | }, 24 | "browserslist": { 25 | "production": [ 26 | ">0.2%", 27 | "not dead", 28 | "not op_mini all" 29 | ], 30 | "development": [ 31 | "last 1 chrome version", 32 | "last 1 firefox version", 33 | "last 1 safari version" 34 | ] 35 | }, 36 | "devDependencies": { 37 | "redux-devtools": "^3.5.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "panacloud", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.19.0", 7 | "bootstrap": "^4.3.1", 8 | "express": "^4.17.1", 9 | "font-awesome": "^4.7.0", 10 | "jquery": "^3.5.1", 11 | "popper.js": "^1.16.1", 12 | "react": "^16.10.2", 13 | "react-bootstrap": "^1.0.0-beta.14", 14 | "react-dom": "^16.10.2", 15 | "react-router-dom": "^5.1.2", 16 | "react-scripts": "3.2.0", 17 | "react-slick": "^0.25.2", 18 | "slick-carousel": "^1.8.1" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": "react-app" 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /react-redux-typescript-template/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /react-router-dom/README.md: -------------------------------------------------------------------------------- 1 | # REACT-ROUTER-DOM 2 | 3 | React Router is the standard routing library for React
4 | “React Router keeps your UI in sync with the URL. It has a simple API with powerful features like lazy code loading, dynamic route matching, and location transition handling built right in. Make the URL your first thought, not an after-thought.” 5 | 6 | 7 | #### Start Project 8 | 9 | $ npm install - React install dependencies from package.json 10 | $ npm start - react-scripts start 11 | $ npm build - react-scripts build 12 | $ npm test - react-scripts test 13 | $ npm eject - react-scripts eject 14 | 15 | 16 | ------------------------------------------ 17 | 18 | 19 | #### Quick Start React-Router-Dom 20 | 21 | ``` $ npx create-react-app demo-app ``` 22 | 23 | ``` $ cd demo-app ``` 24 | 25 | ``` $ npm install react-router-dom ``` 26 | 27 | ``` $ npm start ``` 28 | 29 | 30 | 31 | ##### React-Router Quick-Start 32 | [React Router Web Guides Quick-Start](https://reacttraining.com/react-router/web/guides/quick-start) 33 | 34 | 35 | 36 | ##### React-Router Web-Api 37 | [React Router Web Api](https://reacttraining.com/react-router/web/api) -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 ameenalam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /react-material-ui-contentful/README.md: -------------------------------------------------------------------------------- 1 | # React-Material-UI-Contentful 2 | 3 | Material-UI is an open-source project that features React components that implement Google's Material Design 4 |
5 | Contentful is the platform where you can update the content of your website, a mobile app or any other platform that displays content. We save you the time and hassle to create your own backend to manage the content, and provide many tools which make it easier to actually generate a website or app. 6 | 7 | 8 | 9 | 10 | #### Start Project 11 | 12 | $ npm install - React install dependencies from package.json 13 | $ npm start - react-scripts start 14 | $ npm build - react-scripts build 15 | $ npm test - react-scripts test 16 | $ npm eject - react-scripts eject 17 | 18 | 19 | 20 | 21 | 22 | 23 | ##### Material Design For React 24 | [Getting Started With Material-UI For React (Material Design For React)](https://medium.com/codingthesmartway-com-blog/getting-started-with-material-ui-for-react-material-design-for-react-364b2688b555) 25 | 26 | 27 | ##### MATERIAL-UI 28 | [MATERIAL-UI](https://material-ui.com/) 29 | 30 | 31 | ##### Content Platform 32 | [content platform](https://www.contentful.com/) -------------------------------------------------------------------------------- /react-context-api-hooks/src/contexts/ContextProvider.js: -------------------------------------------------------------------------------- 1 | import React, { createContext, useState } from 'react'; 2 | 3 | // create context, export context 4 | export const Context = createContext() 5 | 6 | 7 | 8 | // create provider - StudentsContextProvider 9 | export const StudentsContextProvider = (props) => { 10 | 11 | const [students, setStudents] = useState([ 12 | { name: "Aleem", class: "devops" }, 13 | { name: "Zeeshan", class: "devops" }, 14 | { name: "Hamza", class: "devops" } 15 | ] 16 | ) 17 | 18 | return ( 19 | 20 | {props.children} 21 | 22 | ); 23 | } 24 | 25 | 26 | 27 | // create provider - TeachersContextProvider 28 | export const TeachersContextProvider = (props) => { 29 | 30 | const [teachers, setTeachers] = useState([ 31 | { name: "Daniyal", class: "devops" }, 32 | { name: "Ameen Alam", class: "devops" }, 33 | { name: "Adil Altaf", class: "devops" } 34 | ] 35 | ) 36 | 37 | return ( 38 | 39 | {props.children} 40 | 41 | ); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /react-redux-typescript-template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-redux-typescript-template", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@reduxjs/toolkit": "^1.2.5", 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "@types/jest": "^24.0.0", 11 | "@types/node": "^12.0.0", 12 | "@types/react": "^16.9.0", 13 | "@types/react-dom": "^16.9.0", 14 | "@types/react-redux": "^7.1.7", 15 | "react": "^16.13.1", 16 | "react-dom": "^16.13.1", 17 | "react-redux": "^7.2.0", 18 | "react-scripts": "3.4.1", 19 | "typescript": "~3.8.2" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "build": "react-scripts build", 24 | "test": "react-scripts test", 25 | "eject": "react-scripts eject" 26 | }, 27 | "eslintConfig": { 28 | "extends": "react-app" 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /react-redux-typescript-template/README.md: -------------------------------------------------------------------------------- 1 | # React-Redux-TypeScript-Template 2 | 3 | Redux is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. ... You can use Redux together with React, or with any other view library. 4 | 5 | 6 | TypeScript provides highly productive development tools for JavaScript IDEs and practices, like static checking. TypeScript makes code easier to read and understand. With TypeScript, we can make a huge improvement over plain JavaScript. TypeScript gives us all the benefits of ES6 (ECMAScript 6), plus more productivity. 7 | 8 | ### cra-template-typescript-redux 9 | 10 | ``` $ npx create-react-app my-app --template redux-typescript ```
11 | ``` $ cd my app ```
12 | ``` $ npm start ``` 13 | 14 | 15 | #### Start Project 16 | 17 | ``` $ npm install ``` or ``` $ yarn ```
18 | ``` $ npm start ``` or ``` $ yarn start ``` 19 | 20 | 21 | 22 | 23 | #### Redux Documentation 24 | 25 | https://redux.js.org/introduction/getting-started 26 | 27 | https://redux.js.org/introduction/installation 28 | 29 | https://react-redux.js.org/ 30 | 31 | https://redux-toolkit.js.org/ 32 | -------------------------------------------------------------------------------- /Ecommerce-App/README.md: -------------------------------------------------------------------------------- 1 | # Ecommerce-App 2 | Develop Ecommerce-App using React Hooks 3 | 4 | 1. Develop Dashboard
5 | Where can you create/operate content for an eCommerce site. 6 | - Create 5 input field 7 | 1. Product Title 8 | 2. Product Details 9 | 3. Product Prize 10 | 4. Product Image (Upload image on any cloud platform past here image URL) 11 | 5. Product ID 12 | - create a button
13 | post data on the product API 14 | 15 | 2. Develop Ecommerce Home Page
16 | Present/Print product API here. 17 | 18 | 3. Add Cart Button
19 | When user click add to cart button show the form
20 | - Create 5 input field 21 | 1. userName 22 | 2. Address 23 | 3. Contact 24 | 4. Email 25 | 5. Quantity 26 | 27 | The user will fill out the form
28 | post data on the purchase API 29 | 30 | 4. Develop Dashboard Purchasing Page
31 | Present/Print purchase API here. 32 | 33 | 5. Develop Each Product Page (using dynamic routing) 34 | 35 | --------------------------- 36 | 37 | ### JSON-Server 38 | JSON Server is a Node Module that you can use to create demo rest json webservice in less than a minute. All you need is a JSON file for sample data.
39 | 40 | Download Project and run as per instruction on README file 41 | [JSON-Server](https://github.com/Ameen-Alam/JSON-Server) -------------------------------------------------------------------------------- /react-context-api-hooks/README.md: -------------------------------------------------------------------------------- 1 | # React-ContextAPI-and-Hooks 2 | 3 | Context provides a way to pass data through the component tree without having to pass props down manually at every level.
4 | The Context API is a component structure provided by the React framework, which enables us to share specific forms of data across all levels of the application. It's aimed at solving the problem of prop drilling. ... Libraries like Redux allows you to get data from the store easily, anywhere in the tree. 5 | 6 | 7 | #### Start Project 8 | 9 | $ npm install - React install dependencies from package.json 10 | $ npm start - react-scripts start 11 | $ npm build - react-scripts build 12 | $ npm test - react-scripts test 13 | $ npm eject - react-scripts eject 14 | 15 | 16 | ------------------------------------------ 17 | 18 | 19 | #### Quick Start React-Router-Dom 20 | 21 | ``` $ npx create-react-app demo-app ``` 22 | 23 | ``` $ cd demo-app ``` 24 | 25 | ``` $ npm start ``` 26 | 27 | 28 | 29 | ##### React-Context-Documentation 30 | [React Context Documentation](https://reactjs.org/docs/context.html) 31 | 32 | 33 | 34 | ##### React-Context-Hooks-Tutorial 35 | [React Context & Hooks Tutorial](https://www.youtube.com/watch?v=XkBB3pPY3t8) 36 | 37 | 38 | [React Context & Hooks Tutorial 2](https://www.google.com/search?q=context+api&oq=context+api&aqs=chrome..69i57j0l7.36943j0j7&sourceid=chrome&ie=UTF-8#kpvalbx=_3MHlXrylCZKckgX597GAAw70) -------------------------------------------------------------------------------- /react-material-ui-contentful/src/Components/Course/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Card from '@material-ui/core/Card' 3 | import CardActions from '@material-ui/core/CardActions' 4 | import CardContent from '@material-ui/core/CardContent' 5 | import CardMedia from '@material-ui/core/CardMedia' 6 | import Button from '@material-ui/core/Button' 7 | import Typography from '@material-ui/core/Typography' 8 | const Course = (props) => { 9 | console.log(props) 10 | return ( 11 |
12 | {props.course ? ( 13 | 14 | 18 | 19 | 20 | {props.course.fields.title} 21 | 22 | 23 | {props.course.fields.description} 24 | 25 | 26 | 27 | 30 | 31 | 32 | ) : null} 33 |
34 | ) 35 | } 36 | export default Course 37 | -------------------------------------------------------------------------------- /React-Hooks-with-Boostrap-Kit/src/Routers/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import History from './history.js' 3 | import Home from '../component/home' 4 | import About from '../component/about' 5 | import Contact from '../component/contact' 6 | import Header from '../component/header' 7 | import Footer from '../component/footer' 8 | import LifeCycle from '../component/LifeCycle' 9 | import ComponentState from '../component/componentState' 10 | 11 | 12 | import Notfound from '../404' 13 | import { Router, Switch, Route } from "react-router-dom"; 14 | import ScrollToTopRoute from './ScrollToTopRoute'; 15 | 16 | const Routers = () => { 17 | return ( 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |