Repository: hiteshchoudhary/chai-aur-react Branch: main Commit: 651285bff5ba Files: 223 Total size: 195.0 KB Directory structure: gitextract_ev68w7bd/ ├── .gitignore ├── .vscode/ │ └── settings.json ├── 01basicreact/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public/ │ │ ├── index.html │ │ ├── manifest.json │ │ └── robots.txt │ └── src/ │ ├── App.js │ ├── Chai.jsx │ └── index.js ├── 01vitereact/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src/ │ │ ├── App.jsx │ │ ├── chai.jsx │ │ └── main.jsx │ └── vite.config.js ├── 02counter/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── index.css │ │ └── main.jsx │ └── vite.config.js ├── 03tailwindprops/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── components/ │ │ │ └── Card.jsx │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 04bgChanger/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── bun.lockb │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 05passwordGenerator/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 06currencyConvertor/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── components/ │ │ │ ├── InputBox.jsx │ │ │ └── index.js │ │ ├── hooks/ │ │ │ └── useCurrencyInfo.js │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 07reactRouter/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── Layout.jsx │ │ ├── components/ │ │ │ ├── About/ │ │ │ │ └── About.jsx │ │ │ ├── Contact/ │ │ │ │ └── Contact.jsx │ │ │ ├── Footer/ │ │ │ │ └── Footer.jsx │ │ │ ├── Github/ │ │ │ │ └── Github.jsx │ │ │ ├── Header/ │ │ │ │ └── Header.jsx │ │ │ ├── Home/ │ │ │ │ └── Home.jsx │ │ │ └── User/ │ │ │ └── User.jsx │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 08miniContext/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── components/ │ │ │ ├── Login.jsx │ │ │ └── Profile.jsx │ │ ├── context/ │ │ │ ├── UserContext.js │ │ │ └── UserContextProvider.jsx │ │ ├── index.css │ │ └── main.jsx │ └── vite.config.js ├── 09themeswitcher/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── components/ │ │ │ ├── Card.jsx │ │ │ └── ThemeBtn.jsx │ │ ├── contexts/ │ │ │ └── theme.js │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 10todocontextLocal/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── components/ │ │ │ ├── TodoForm.jsx │ │ │ ├── TodoItem.jsx │ │ │ └── index.js │ │ ├── contexts/ │ │ │ ├── TodoContext.js │ │ │ └── index.js │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js ├── 12MegaBlog/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── bun.lockb │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── appwrite/ │ │ │ ├── auth.js │ │ │ └── config.js │ │ ├── components/ │ │ │ ├── AuthLayout.jsx │ │ │ ├── Button.jsx │ │ │ ├── Footer/ │ │ │ │ └── Footer.jsx │ │ │ ├── Header/ │ │ │ │ ├── Header.jsx │ │ │ │ └── LogoutBtn.jsx │ │ │ ├── Input.jsx │ │ │ ├── Login.jsx │ │ │ ├── Logo.jsx │ │ │ ├── PostCard.jsx │ │ │ ├── RTE.jsx │ │ │ ├── Select.jsx │ │ │ ├── Signup.jsx │ │ │ ├── container/ │ │ │ │ └── Container.jsx │ │ │ ├── index.js │ │ │ └── post-form/ │ │ │ └── PostForm.jsx │ │ ├── conf/ │ │ │ └── conf.js │ │ ├── index.css │ │ ├── main.jsx │ │ ├── pages/ │ │ │ ├── AddPost.jsx │ │ │ ├── AllPosts.jsx │ │ │ ├── EditPost.jsx │ │ │ ├── Home.jsx │ │ │ ├── Login.jsx │ │ │ ├── Post.jsx │ │ │ └── Signup.jsx │ │ └── store/ │ │ ├── authSlice.js │ │ └── store.js │ ├── tailwind.config.js │ └── vite.config.js ├── contextNotes.md ├── currency.md ├── customReact/ │ ├── customreact.js │ └── index.html ├── interview-discussion/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── package.json │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── index.css │ │ └── main.jsx │ └── vite.config.js ├── reactRouterNotes.md ├── readme.md ├── reduxToolkitTodo/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── bun.lockb │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── App.css │ │ ├── App.jsx │ │ ├── app/ │ │ │ └── store.js │ │ ├── components/ │ │ │ ├── AddTodo.jsx │ │ │ └── Todos.jsx │ │ ├── features/ │ │ │ └── todo/ │ │ │ └── todoSlice.js │ │ ├── index.css │ │ └── main.jsx │ ├── tailwind.config.js │ └── vite.config.js └── todoContextapiNotes.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store 12MegaBlog/.env ================================================ FILE: .vscode/settings.json ================================================ { "editor.acceptSuggestionOnEnter": "on", "liveServer.settings.port": 5501 } ================================================ FILE: 01basicreact/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # production /build # misc .DS_Store .env.local .env.development.local .env.test.local .env.production.local npm-debug.log* yarn-debug.log* yarn-error.log* ================================================ FILE: 01basicreact/README.md ================================================ # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in your browser. The page will reload when you make changes.\ You may also see any lint errors in the console. ### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `npm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can't go back!** If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `npm run build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) ================================================ FILE: 01basicreact/package.json ================================================ { "name": "01basicreact", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } } ================================================ FILE: 01basicreact/public/index.html ================================================ React App
================================================ FILE: 01basicreact/public/manifest.json ================================================ { "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", "type": "image/png", "sizes": "512x512" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" } ================================================ FILE: 01basicreact/public/robots.txt ================================================ # https://www.robotstxt.org/robotstxt.html User-agent: * Disallow: ================================================ FILE: 01basicreact/src/App.js ================================================ import Chai from "./Chai"; function App() { return ( <> ); } export default App; ================================================ FILE: 01basicreact/src/Chai.jsx ================================================ function Chai(){ return(

chai in react

) } export default Chai ================================================ FILE: 01basicreact/src/index.js ================================================ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( ); ================================================ FILE: 01vitereact/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 01vitereact/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 01vitereact/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 01vitereact/index.html ================================================ Vite + React
================================================ FILE: 01vitereact/package.json ================================================ { "name": "01vitereact", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "vite": "^4.4.5" } } ================================================ FILE: 01vitereact/src/App.jsx ================================================ import Chai from "./chai" function App() { const username = "chai aur code" return ( <>

chai aur react {username}

test para

) } export default App ================================================ FILE: 01vitereact/src/chai.jsx ================================================ function Chai(){ return(

chai is ready

) } export default Chai ================================================ FILE: 01vitereact/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' function MyApp(){ return (

Custom App | chai

) } // const ReactElement = { // type: 'a', // props: { // href: 'https://google.com', // target: '_blank' // }, // children: 'Click me to visit google' // } const anotherElement = ( Visit google ) const anotherUser = "chai aur react" const reactElement = React.createElement( 'a', {href: 'https://google.com',target: '_blank' }, 'click me to visit google', anotherElement ) ReactDOM.createRoot(document.getElementById('root')).render( reactElement ) ================================================ FILE: 01vitereact/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 02counter/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 02counter/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 02counter/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 02counter/index.html ================================================ Vite + React
================================================ FILE: 02counter/package.json ================================================ { "name": "02counter", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "vite": "^4.4.5" } } ================================================ FILE: 02counter/src/App.css ================================================ #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } .logo { height: 6em; padding: 1.5em; will-change: filter; transition: filter 300ms; } .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: no-preference) { a:nth-of-type(2) .logo { animation: logo-spin infinite 20s linear; } } .card { padding: 2em; } .read-the-docs { color: #888; } ================================================ FILE: 02counter/src/App.jsx ================================================ import { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' function App() { const [counter, setCounter] = useState(15) //let counter = 15 const addValue = () => { //counter = counter + 1 setCounter(prevCounter => prevCounter + 1) setCounter(prevCounter => prevCounter + 1 ) setCounter(prevCounter => prevCounter + 1) setCounter(prevCounter => prevCounter + 1) } const removeValue = () => { setCounter(counter - 1) } return ( <>

Chai aur react

Counter value: {counter}


footer: {counter}

) } export default App ================================================ FILE: 02counter/src/index.css ================================================ :root { font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; color-scheme: light dark; color: rgba(255, 255, 255, 0.87); background-color: #242424; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; } a { font-weight: 500; color: #646cff; text-decoration: inherit; } a:hover { color: #535bf2; } body { margin: 0; display: flex; place-items: center; min-width: 320px; min-height: 100vh; } h1 { font-size: 3.2em; line-height: 1.1; } button { border-radius: 8px; border: 1px solid transparent; padding: 0.6em 1.2em; font-size: 1em; font-weight: 500; font-family: inherit; background-color: #1a1a1a; cursor: pointer; transition: border-color 0.25s; } button:hover { border-color: #646cff; } button:focus, button:focus-visible { outline: 4px auto -webkit-focus-ring-color; } @media (prefers-color-scheme: light) { :root { color: #213547; background-color: #ffffff; } a:hover { color: #747bff; } button { background-color: #f9f9f9; } } ================================================ FILE: 02counter/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')).render( , ) ================================================ FILE: 02counter/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 03tailwindprops/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 03tailwindprops/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 03tailwindprops/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 03tailwindprops/index.html ================================================ Vite + React
================================================ FILE: 03tailwindprops/package.json ================================================ { "name": "03tailwindprops", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "autoprefixer": "^10.4.15", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "postcss": "^8.4.28", "tailwindcss": "^3.3.3", "vite": "^4.4.5" } } ================================================ FILE: 03tailwindprops/postcss.config.js ================================================ export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ================================================ FILE: 03tailwindprops/src/App.css ================================================ #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } .logo { height: 6em; padding: 1.5em; will-change: filter; transition: filter 300ms; } .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: no-preference) { a:nth-of-type(2) .logo { animation: logo-spin infinite 20s linear; } } .card { padding: 2em; } .read-the-docs { color: #888; } ================================================ FILE: 03tailwindprops/src/App.jsx ================================================ import { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' import Card from './components/Card' function App() { const [count, setCount] = useState(0) let myObj = { username: "hitesh", age: 21 } let newArr = [1, 2, 3] return ( <>

Tailwind test

) } export default App ================================================ FILE: 03tailwindprops/src/components/Card.jsx ================================================ import React from 'react' function Card({username, btnText="visit me"}) { console.log(username); return (
AirMax Pro

{username}

Lorem ipsum dolor sit amet consectetur adipisicing elit. Excepturi, debitis?

) } export default Card ================================================ FILE: 03tailwindprops/src/index.css ================================================ @tailwind base; @tailwind components; @tailwind utilities; :root { font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; color-scheme: light dark; color: rgba(255, 255, 255, 0.87); background-color: #242424; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; } a { font-weight: 500; color: #646cff; text-decoration: inherit; } a:hover { color: #535bf2; } body { margin: 0; display: flex; place-items: center; min-width: 320px; min-height: 100vh; } h1 { font-size: 3.2em; line-height: 1.1; } button { border-radius: 8px; border: 1px solid transparent; padding: 0.6em 1.2em; font-size: 1em; font-weight: 500; font-family: inherit; background-color: #1a1a1a; cursor: pointer; transition: border-color 0.25s; } button:hover { border-color: #646cff; } button:focus, button:focus-visible { outline: 4px auto -webkit-focus-ring-color; } @media (prefers-color-scheme: light) { :root { color: #213547; background-color: #ffffff; } a:hover { color: #747bff; } button { background-color: #f9f9f9; } } ================================================ FILE: 03tailwindprops/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')).render( , ) ================================================ FILE: 03tailwindprops/tailwind.config.js ================================================ /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], } ================================================ FILE: 03tailwindprops/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 04bgChanger/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 04bgChanger/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 04bgChanger/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 04bgChanger/index.html ================================================ Vite + React
================================================ FILE: 04bgChanger/package.json ================================================ { "name": "04bgchanger", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "autoprefixer": "^10.4.15", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "postcss": "^8.4.28", "tailwindcss": "^3.3.3", "vite": "^4.4.5" } } ================================================ FILE: 04bgChanger/postcss.config.js ================================================ export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ================================================ FILE: 04bgChanger/src/App.css ================================================ #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } .logo { height: 6em; padding: 1.5em; will-change: filter; transition: filter 300ms; } .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: no-preference) { a:nth-of-type(2) .logo { animation: logo-spin infinite 20s linear; } } .card { padding: 2em; } .read-the-docs { color: #888; } ================================================ FILE: 04bgChanger/src/App.jsx ================================================ import { useState } from "react" function App() { const [color, setColor] = useState("olive") return (
) } export default App ================================================ FILE: 04bgChanger/src/index.css ================================================ @tailwind base; @tailwind components; @tailwind utilities; ================================================ FILE: 04bgChanger/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')).render( , ) ================================================ FILE: 04bgChanger/tailwind.config.js ================================================ /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], } ================================================ FILE: 04bgChanger/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 05passwordGenerator/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 05passwordGenerator/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 05passwordGenerator/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 05passwordGenerator/index.html ================================================ Vite + React
================================================ FILE: 05passwordGenerator/package.json ================================================ { "name": "05passwordgenerator", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "autoprefixer": "^10.4.15", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "postcss": "^8.4.28", "tailwindcss": "^3.3.3", "vite": "^4.4.5" } } ================================================ FILE: 05passwordGenerator/postcss.config.js ================================================ export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ================================================ FILE: 05passwordGenerator/src/App.css ================================================ ================================================ FILE: 05passwordGenerator/src/App.jsx ================================================ import { useState, useCallback, useEffect, useRef } from 'react' function App() { const [length, setLength] = useState(8) const [numberAllowed, setNumberAllowed] = useState(false); const [charAllowed, setCharAllowed] = useState(false) const [password, setPassword] = useState("") //useRef hook const passwordRef = useRef(null) const passwordGenerator = useCallback(() => { let pass = "" let str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" if (numberAllowed) str += "0123456789" if (charAllowed) str += "!@#$%^&*-_+=[]{}~`" for (let i = 1; i <= length; i++) { let char = Math.floor(Math.random() * str.length + 1) pass += str.charAt(char) } setPassword(pass) }, [length, numberAllowed, charAllowed, setPassword]) const copyPasswordToClipboard = useCallback(() => { passwordRef.current?.select(); passwordRef.current?.setSelectionRange(0, 999); window.navigator.clipboard.writeText(password) }, [password]) useEffect(() => { passwordGenerator() }, [length, numberAllowed, charAllowed, passwordGenerator]) return (

Password generator

{setLength(e.target.value)}} />
{ setNumberAllowed((prev) => !prev); }} />
{ setCharAllowed((prev) => !prev ) }} />
) } export default App ================================================ FILE: 05passwordGenerator/src/index.css ================================================ @tailwind base; @tailwind components; @tailwind utilities; ================================================ FILE: 05passwordGenerator/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')).render( , ) ================================================ FILE: 05passwordGenerator/tailwind.config.js ================================================ /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], } ================================================ FILE: 05passwordGenerator/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 06currencyConvertor/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 06currencyConvertor/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 06currencyConvertor/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 06currencyConvertor/index.html ================================================ Vite + React
================================================ FILE: 06currencyConvertor/package.json ================================================ { "name": "06currencyconvertor", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "autoprefixer": "^10.4.15", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "postcss": "^8.4.29", "tailwindcss": "^3.3.3", "vite": "^4.4.5" } } ================================================ FILE: 06currencyConvertor/postcss.config.js ================================================ export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ================================================ FILE: 06currencyConvertor/src/App.css ================================================ #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } .logo { height: 6em; padding: 1.5em; will-change: filter; transition: filter 300ms; } .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: no-preference) { a:nth-of-type(2) .logo { animation: logo-spin infinite 20s linear; } } .card { padding: 2em; } .read-the-docs { color: #888; } ================================================ FILE: 06currencyConvertor/src/App.jsx ================================================ import { useState } from 'react' import {InputBox} from './components' import useCurrencyInfo from './hooks/useCurrencyInfo' function App() { const [amount, setAmount] = useState(0) const [from, setFrom] = useState("usd") const [to, setTo] = useState("inr") const [convertedAmount, setConvertedAmount] = useState(0) const currencyInfo = useCurrencyInfo(from) const options = Object.keys(currencyInfo) const swap = () => { setFrom(to) setTo(from) setConvertedAmount(amount) setAmount(convertedAmount) } const convert = () => { setConvertedAmount(amount * currencyInfo[to]) } return (
{ e.preventDefault(); convert() }} >
setAmount(amount)} selectCurrency={from} onAmountChange={(amount) => setAmount(amount)} />
setTo(currency)} selectCurrency={from} amountDisable />
); } export default App ================================================ FILE: 06currencyConvertor/src/components/InputBox.jsx ================================================ import React, {useId} from 'react' function InputBox({ label, amount, onAmountChange, onCurrencyChange, currencyOptions = [], selectCurrency = "usd", amountDisable = false, currencyDisable = false, className = "", }) { const amountInputId = useId() return (
onAmountChange && onAmountChange(Number(e.target.value))} />

Currency Type

); } export default InputBox; ================================================ FILE: 06currencyConvertor/src/components/index.js ================================================ import InputBox from './InputBox' export {InputBox} ================================================ FILE: 06currencyConvertor/src/hooks/useCurrencyInfo.js ================================================ import {useEffect, useState} from "react" function useCurrencyInfo(currency){ const [data, setData] = useState({}) useEffect(() => { fetch(`https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/${currency}.json`) .then((res) => res.json()) .then((res) => setData(res[currency])) console.log(data); }, [currency]) console.log(data); return data } export default useCurrencyInfo; ================================================ FILE: 06currencyConvertor/src/index.css ================================================ @tailwind base; @tailwind components; @tailwind utilities; ================================================ FILE: 06currencyConvertor/src/main.jsx ================================================ import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')).render( , ) ================================================ FILE: 06currencyConvertor/tailwind.config.js ================================================ /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], } ================================================ FILE: 06currencyConvertor/vite.config.js ================================================ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], }) ================================================ FILE: 07reactRouter/.eslintrc.cjs ================================================ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:react/jsx-runtime', 'plugin:react-hooks/recommended', ], ignorePatterns: ['dist', '.eslintrc.cjs'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, settings: { react: { version: '18.2' } }, plugins: ['react-refresh'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, } ================================================ FILE: 07reactRouter/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: 07reactRouter/README.md ================================================ # React + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ================================================ FILE: 07reactRouter/index.html ================================================ Vite + React
================================================ FILE: 07reactRouter/package.json ================================================ { "name": "07reactrouter", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.15.0" }, "devDependencies": { "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@vitejs/plugin-react": "^4.0.3", "autoprefixer": "^10.4.15", "eslint": "^8.45.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "postcss": "^8.4.29", "tailwindcss": "^3.3.3", "vite": "^4.4.5" } } ================================================ FILE: 07reactRouter/postcss.config.js ================================================ export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, } ================================================ FILE: 07reactRouter/src/App.css ================================================ #root { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } .logo { height: 6em; padding: 1.5em; will-change: filter; transition: filter 300ms; } .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: no-preference) { a:nth-of-type(2) .logo { animation: logo-spin infinite 20s linear; } } .card { padding: 2em; } .read-the-docs { color: #888; } ================================================ FILE: 07reactRouter/src/App.jsx ================================================ import { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' import './App.css' import Header from './components/Header/Header' import Footer from './components/Footer/Footer' import Home from './components/Home/Home' function App() { const [count, setCount] = useState(0) return ( <> ) } export default App ================================================ FILE: 07reactRouter/src/Layout.jsx ================================================ import React from 'react' import Header from './components/Header/Header' import Footer from './components/Footer/Footer' import { Outlet } from 'react-router-dom' function Layout() { return ( <>