├── 09themeswitcher ├── src │ ├── App.css │ ├── index.css │ ├── main.jsx │ ├── contexts │ │ └── theme.js │ ├── App.jsx │ ├── components │ │ └── ThemeBtn.jsx │ └── assets │ │ └── react.svg ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 05passwordGenerator ├── src │ ├── App.css │ ├── index.css │ ├── main.jsx │ └── App.jsx ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 10todocontextLocal ├── src │ ├── App.css │ ├── index.css │ ├── contexts │ │ ├── index.js │ │ └── TodoContext.js │ ├── components │ │ ├── index.js │ │ ├── TodoForm.jsx │ │ └── TodoItem.jsx │ ├── main.jsx │ └── App.jsx ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── .gitignore ├── 07reactRouter ├── src │ ├── index.css │ ├── components │ │ ├── User │ │ │ └── User.jsx │ │ ├── Github │ │ │ └── Github.jsx │ │ ├── About │ │ │ └── About.jsx │ │ └── Home │ │ │ └── Home.jsx │ ├── Layout.jsx │ ├── App.jsx │ ├── App.css │ ├── main.jsx │ └── assets │ │ └── react.svg ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 12MegaBlog ├── src │ ├── index.css │ ├── components │ │ ├── Logo.jsx │ │ ├── container │ │ │ └── Container.jsx │ │ ├── Button.jsx │ │ ├── Header │ │ │ ├── LogoutBtn.jsx │ │ │ └── Header.jsx │ │ ├── PostCard.jsx │ │ ├── index.js │ │ ├── Input.jsx │ │ ├── Select.jsx │ │ ├── AuthLayout.jsx │ │ ├── RTE.jsx │ │ ├── Login.jsx │ │ └── Signup.jsx │ ├── pages │ │ ├── Login.jsx │ │ ├── Signup.jsx │ │ ├── AddPost.jsx │ │ ├── AllPosts.jsx │ │ ├── EditPost.jsx │ │ ├── Home.jsx │ │ └── Post.jsx │ ├── store │ │ ├── store.js │ │ └── authSlice.js │ ├── conf │ │ └── conf.js │ ├── App.css │ ├── App.jsx │ ├── appwrite │ │ └── auth.js │ ├── main.jsx │ └── assets │ │ └── react.svg ├── bun.lockb ├── postcss.config.js ├── .env.sample ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 04bgChanger ├── src │ ├── index.css │ ├── main.jsx │ ├── App.css │ ├── App.jsx │ └── assets │ │ └── react.svg ├── bun.lockb ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── reduxToolkitTodo ├── src │ ├── index.css │ ├── app │ │ └── store.js │ ├── main.jsx │ ├── App.jsx │ ├── features │ │ └── todo │ │ │ └── todoSlice.js │ ├── App.css │ └── components │ │ ├── AddTodo.jsx │ │ └── Todos.jsx ├── bun.lockb ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 06currencyConvertor ├── src │ ├── components │ │ ├── index.js │ │ └── InputBox.jsx │ ├── index.css │ ├── main.jsx │ ├── hooks │ │ └── useCurrencyInfo.js │ ├── App.css │ └── App.jsx ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 01basicreact ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── Chai.jsx │ ├── App.js │ └── index.js ├── .gitignore ├── package.json └── README.md ├── .vscode └── settings.json ├── 01vitereact ├── src │ ├── chai.jsx │ ├── App.jsx │ └── main.jsx ├── vite.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 03tailwindprops ├── postcss.config.js ├── vite.config.js ├── tailwind.config.js ├── src │ ├── main.jsx │ ├── App.jsx │ ├── App.css │ ├── components │ │ └── Card.jsx │ ├── index.css │ └── assets │ │ └── react.svg ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 08miniContext ├── src │ ├── context │ │ ├── UserContext.js │ │ └── UserContextProvider.jsx │ ├── main.jsx │ ├── components │ │ ├── Profile.jsx │ │ └── Login.jsx │ ├── App.jsx │ ├── App.css │ ├── index.css │ └── assets │ │ └── react.svg ├── vite.config.js ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── 02counter ├── vite.config.js ├── src │ ├── main.jsx │ ├── App.css │ ├── App.jsx │ ├── index.css │ └── assets │ │ └── react.svg ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── interview-discussion ├── vite.config.js ├── src │ ├── main.jsx │ ├── App.css │ ├── App.jsx │ └── index.css ├── .gitignore ├── index.html ├── README.md ├── .eslintrc.cjs ├── package.json └── public │ └── vite.svg ├── customReact ├── index.html └── customreact.js ├── readme.md ├── todoContextapiNotes.md └── currency.md /09themeswitcher/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /05passwordGenerator/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /10todocontextLocal/src/App.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 12MegaBlog/.env 3 | -------------------------------------------------------------------------------- /07reactRouter/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /12MegaBlog/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /04bgChanger/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /09themeswitcher/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /10todocontextLocal/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /reduxToolkitTodo/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /05passwordGenerator/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /06currencyConvertor/src/components/index.js: -------------------------------------------------------------------------------- 1 | import InputBox from './InputBox' 2 | 3 | export {InputBox} -------------------------------------------------------------------------------- /06currencyConvertor/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /04bgChanger/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/04bgChanger/bun.lockb -------------------------------------------------------------------------------- /10todocontextLocal/src/contexts/index.js: -------------------------------------------------------------------------------- 1 | export {TodoContext, TodoProvider, useTodo} from "./TodoContext" -------------------------------------------------------------------------------- /12MegaBlog/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/12MegaBlog/bun.lockb -------------------------------------------------------------------------------- /01basicreact/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.acceptSuggestionOnEnter": "on", 3 | "liveServer.settings.port": 5501 4 | } -------------------------------------------------------------------------------- /reduxToolkitTodo/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/reduxToolkitTodo/bun.lockb -------------------------------------------------------------------------------- /01basicreact/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/01basicreact/public/favicon.ico -------------------------------------------------------------------------------- /01basicreact/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/01basicreact/public/logo192.png -------------------------------------------------------------------------------- /01basicreact/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-aur-react/HEAD/01basicreact/public/logo512.png -------------------------------------------------------------------------------- /04bgChanger/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /12MegaBlog/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /01basicreact/src/Chai.jsx: -------------------------------------------------------------------------------- 1 | function Chai(){ 2 | return( 3 |

chai in react

4 | ) 5 | } 6 | 7 | export default Chai -------------------------------------------------------------------------------- /01vitereact/src/chai.jsx: -------------------------------------------------------------------------------- 1 | function Chai(){ 2 | return( 3 |

chai is ready

4 | ) 5 | } 6 | 7 | export default Chai -------------------------------------------------------------------------------- /03tailwindprops/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /07reactRouter/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /09themeswitcher/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /reduxToolkitTodo/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /05passwordGenerator/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /06currencyConvertor/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /10todocontextLocal/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /10todocontextLocal/src/components/index.js: -------------------------------------------------------------------------------- 1 | import TodoForm from "./TodoForm"; 2 | import TodoItem from "./TodoItem"; 3 | 4 | export {TodoForm, TodoItem} -------------------------------------------------------------------------------- /08miniContext/src/context/UserContext.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const UserContext = React.createContext() 4 | 5 | export default UserContext; 6 | 7 | -------------------------------------------------------------------------------- /12MegaBlog/src/components/Logo.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Logo({width = '100px'}) { 4 | return ( 5 |
Logo
6 | ) 7 | } 8 | 9 | export default Logo -------------------------------------------------------------------------------- /12MegaBlog/.env.sample: -------------------------------------------------------------------------------- 1 | VITE_APPWRITE_URL="test environment" 2 | VITE_APPWRITE_PROJECT_ID="" 3 | VITE_APPWRITE_DATABASE_ID="" 4 | VITE_APPWRITE_COLLECTION_ID="" 5 | VITE_APPWRITE_BUCKET_ID="" -------------------------------------------------------------------------------- /01basicreact/src/App.js: -------------------------------------------------------------------------------- 1 | 2 | import Chai from "./Chai"; 3 | 4 | function App() { 5 | return ( 6 | <> 7 | 8 | 9 | 10 | ); 11 | } 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /01vitereact/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /02counter/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /04bgChanger/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /12MegaBlog/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /03tailwindprops/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /07reactRouter/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /08miniContext/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /09themeswitcher/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /reduxToolkitTodo/src/app/store.js: -------------------------------------------------------------------------------- 1 | import {configureStore} from '@reduxjs/toolkit'; 2 | import todoReducer from '../features/todo/todoSlice'; 3 | 4 | export const store = configureStore({ 5 | reducer: todoReducer 6 | }) -------------------------------------------------------------------------------- /reduxToolkitTodo/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /05passwordGenerator/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /06currencyConvertor/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /10todocontextLocal/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /interview-discussion/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /12MegaBlog/src/components/container/Container.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Container({children}) { 4 | return
{children}
; 5 | 6 | } 7 | 8 | export default Container -------------------------------------------------------------------------------- /12MegaBlog/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /03tailwindprops/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /04bgChanger/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /07reactRouter/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /01basicreact/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | 4 | import App from './App'; 5 | 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /05passwordGenerator/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /06currencyConvertor/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /10todocontextLocal/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /reduxToolkitTodo/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /12MegaBlog/src/pages/Login.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Login as loginComponent } from '../components' 3 | function Login() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | 11 | export default Login -------------------------------------------------------------------------------- /12MegaBlog/src/pages/Signup.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Signup as SignupComponent } from '../components' 3 | 4 | function Signup() { 5 | return ( 6 |
7 | 8 |
9 | ) 10 | } 11 | 12 | export default Signup -------------------------------------------------------------------------------- /02counter/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /09themeswitcher/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | darkMode: "class", 8 | theme: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | } 13 | 14 | -------------------------------------------------------------------------------- /04bgChanger/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /08miniContext/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /03tailwindprops/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /05passwordGenerator/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /06currencyConvertor/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /09themeswitcher/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /10todocontextLocal/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /01vitereact/src/App.jsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | import Chai from "./chai" 4 | 5 | 6 | function App() { 7 | const username = "chai aur code" 8 | 9 | return ( 10 | <> 11 | 12 |

chai aur react {username}

13 |

test para

14 | 15 | ) 16 | } 17 | 18 | export default App 19 | -------------------------------------------------------------------------------- /interview-discussion/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /12MegaBlog/src/store/store.js: -------------------------------------------------------------------------------- 1 | import {configureStore} from '@reduxjs/toolkit'; 2 | import authSlice from './authSlice'; 3 | 4 | const store = configureStore({ 5 | reducer: { 6 | auth : authSlice, 7 | //TODO: add more slices here for posts 8 | } 9 | }); 10 | 11 | 12 | export default store; -------------------------------------------------------------------------------- /07reactRouter/src/components/User/User.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useParams } from 'react-router-dom' 3 | 4 | function User() { 5 | const {userid} = useParams() 6 | return ( 7 |
User: {userid}
8 | ) 9 | } 10 | 11 | export default User -------------------------------------------------------------------------------- /12MegaBlog/src/pages/AddPost.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Container, PostForm } from '../components' 3 | 4 | function AddPost() { 5 | return ( 6 |
7 | 8 | 9 | 10 |
11 | ) 12 | } 13 | 14 | export default AddPost -------------------------------------------------------------------------------- /customReact/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Custom React App 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /08miniContext/src/components/Profile.jsx: -------------------------------------------------------------------------------- 1 | import React, {useContext} from 'react' 2 | import UserContext from '../context/UserContext' 3 | 4 | function Profile() { 5 | const {user} = useContext(UserContext) 6 | 7 | if (!user) return
please login
8 | 9 | return
Welcome {user.username}
10 | } 11 | 12 | export default Profile -------------------------------------------------------------------------------- /07reactRouter/src/Layout.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Header from './components/Header/Header' 3 | import Footer from './components/Footer/Footer' 4 | import { Outlet } from 'react-router-dom' 5 | 6 | function Layout() { 7 | return ( 8 | <> 9 |
10 | 11 |