React Project Tutorial for Beginners (Hooks, Context API, Tailwind, TypeScript, Authentication)

ByteGrad July 8, 2024
Video Thumbnail
ByteGrad Logo

ByteGrad

@bytegrad

About

Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). My COMPLETE React & Next.js course is out now! Find it here: https://bytegrad.com/courses/professional-react-nextjs It's the #1 resource to master the latest React & Next.js. I'm very proud of it, my best work! Interested in sponsoring me? I love working with sponsors. Please email me here: [email protected] Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 and KRS-number: 0001125554

Video Description

👉 IMPORTANT: Sign up for Kinde authentication here: https://bit.ly/3QOe1Bh (paid sponsorship). Disclaimer: this is a sponsored video (paid). It's your responsibility to evaluate safety, accuracy and other relevant parts of the reviewed product. 👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs Final code: https://github.com/ByteGrad/todo-app Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). 👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs 👉 Professional JavaScript Course: https://bytegrad.com/courses/professional-javascript 👉 Professional CSS Course: https://bytegrad.com/courses/professional-css 👉 Web development roadmap 2024 & 2025: https://email.bytegrad.com 👉 Email newsletter (BIG update soon): https://email.bytegrad.com 👉 Discord: all my courses have a private Discord ⏱️ Timestamps: 00:00 Intro 02:10 Project setup 04:12 Fresh React app look-around 12:25 Tailwind CSS setup 16:52 Google font 19:54 Kinde setup 21:33 Creating components + styling with Tailwind 59:43 Reusable button component 1:03:50 Props 1:15:15 List / map (initial todos) 1:31:05 Manipulate styling (line-through) 1:33:25 useState hook (toggle, delete) 2:10:18 Event bubbling 2:13:45 Counter (prop drilling) 2:27:07 Add todo 2:29:08 Controlled input 2:35:38 Conditional rendering (empty state) 2:39:15 Restrict functionality for guest users 2:42:05 Better app structure 2:56:43 TypeScript in React 3:26:00 State management: State / derived state / event handlers 3:33:40 Folder structure: lib folder (types) 3:35:15 Context API for state management 4:03:45 Custom hook (for Todos Context) 4:10:02 useEffect: Data fetching in React 4:17:20 useEffect: Persist data in localStorage 4:32:12 Add authentication 4:50:21 Deploy to Vercel 4:54:07 Build (npm run build) 5:02:49 Outro #webdevelopment #reactjs #nextjs Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 . . TOP resource to LEARN AI for Developers - https://datacamp.pxf.io/RGyxrR (paid sponsorship & ByteGrad Sp. z o.o. gets commission)

Upgrade Your iPhone Experience

AI-recommended products based on this video

Loading...
DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

(1,577)
$12.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
FNTCASE for iPhone 12 Case: iPhone 12 Pro Case Clear Slim Shockproof Cell Phone Protective Cover | Anti Yellowing Scratch Proof Drop Proof Tough 5G Mobile Phone Protection Bumper 6.1 inch Global Recycled Standard

FNTCASE for iPhone 12 Case: iPhone 12 Pro Case Clear Slim Shockproof Cell Phone Protective Cover | Anti Yellowing Scratch Proof Drop Proof Tough 5G Mobile Phone Protection Bumper 6.1 inch Global Recycled Standard

(2,171)
$7.19
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Yarxiawin Phone Case for Samsung S25 Case with Ring Stand Magnetic Compatible with Magsafe Wireless Charger, Pink Bumper Cover Samsung Galaxy S25 Case Clear Shockproof (Blue)

Yarxiawin Phone Case for Samsung S25 Case with Ring Stand Magnetic Compatible with Magsafe Wireless Charger, Pink Bumper Cover Samsung Galaxy S25 Case Clear Shockproof (Blue)

(0)
$20.23
FREE delivery Sat, Jun 14 on your first order
Loading...
AsperX for Magsafe Power Bank, 10000mAh Wireless Magnetic Power Bank, 22.5W Wire Fast Charging Portable Charger with USB C Cable, LCD Display for Magsafe Battery Pack for iPhone 16/15/14/13/12

AsperX for Magsafe Power Bank, 10000mAh Wireless Magnetic Power Bank, 22.5W Wire Fast Charging Portable Charger with USB C Cable, LCD Display for Magsafe Battery Pack for iPhone 16/15/14/13/12

(895)
$37.98
FREE delivery Sat, Sep 20
400+ bought in past month
Loading...
Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

(26,678)
$259.99$194.99
FREE delivery Wed, Aug 20
5K+ bought in past month
Loading...
3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

(30,415)
$30.39
Prime
1K+ bought in past month
Loading...
3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

(27,328)
$39.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

(27)
$27.99
FREE delivery Sat, Jun 14 on your first order
Loading...
soundcore P31i by Anker, Real-Time Adaptive Noise Cancelling, Hi-Res Sound, Translation Earbuds, 50H Playtime, Wireless Earbuds, Bluetooth Earphones, Spatial Audio, Fast Charging, IP55 ClimatePartner certified

soundcore P31i by Anker, Real-Time Adaptive Noise Cancelling, Hi-Res Sound, Translation Earbuds, 50H Playtime, Wireless Earbuds, Bluetooth Earphones, Spatial Audio, Fast Charging, IP55 ClimatePartner certified

(105)
$39.99
FREE delivery Thu, Nov 27
Loading...
Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black

Spigen Case for Galaxy S25 Case, Tough Armor (Ai) MagFit [Wireless Charging] Compatible with MagSafe - Black

(2,126)
$28.99
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black

Spigen Case for iPhone 16 Case, Tough Armor Designed for Apple iPhone 16 - Black

(126)
$22.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black

Spigen Case for iPhone 16 Pro Case, Tough Armor [MagFit] Compatible with MagSafe - Black

(341)
$32.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black

Spigen Case for iPhone 16 Plus Case, Tough Armor (AI) [MagFit] Compatible with MagSafe - Black

(818)
$29.99
FREE delivery Sat, Jun 14 on your first order
Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

(81)
$9.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

(1,577)
$12.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16

MRGLAS 2025 Upgraded Magsafe Car Mount Vacuum Suction Magnetic Phone Holder Car, 360° Foldable Adjustable Suction Cup Phone Stand [89+LBS Suction & 2800gf Magnetic] for Car Accessories iPhone17/16

(1,124)
$27.19
1K+ bought in past month
Loading...
for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

(11,563)
$16.98
FREE delivery Tue, Jun 17 on your first order
3K+ bought in past month
Loading...
Phone Holder Car for Magsafe Car Accessories [78+LBS Hyper Suction & 4400gf Strongest Magnetic] 360°Adjustable Car Phone Holder Mount, Phone Holders for Car/Gym/Mirror for iPhone 16 Pro Max & Android

Phone Holder Car for Magsafe Car Accessories [78+LBS Hyper Suction & 4400gf Strongest Magnetic] 360°Adjustable Car Phone Holder Mount, Phone Holders for Car/Gym/Mirror for iPhone 16 Pro Max & Android

(89)
$27.99
Prime
Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
FNTCASE for iPhone 12 Case: iPhone 12 Pro Case Clear Slim Shockproof Cell Phone Protective Cover | Anti Yellowing Scratch Proof Drop Proof Tough 5G Mobile Phone Protection Bumper 6.1 inch Global Recycled Standard

FNTCASE for iPhone 12 Case: iPhone 12 Pro Case Clear Slim Shockproof Cell Phone Protective Cover | Anti Yellowing Scratch Proof Drop Proof Tough 5G Mobile Phone Protection Bumper 6.1 inch Global Recycled Standard

(2,171)
$7.19
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

(81)
$9.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad

iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad

(4,036)
$8.99
FREE delivery Sun, Jun 29 on your first order
2K+ bought in past month
Loading...
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

(5,626)
$17.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

(2,193)
$14.24
FREE delivery Sat, Jun 14 on your first order
400+ bought in past month
Loading...
Wireless CarPlay Adapter for iPhone, Mini Size with Reset Button, Converts Wired to Wireless CarPlay Dongle Plug & Play CarPlay Wireless Adapter for Apple iPhone iOS 12+ & Cars from 2017(Grey)

Wireless CarPlay Adapter for iPhone, Mini Size with Reset Button, Converts Wired to Wireless CarPlay Dongle Plug & Play CarPlay Wireless Adapter for Apple iPhone iOS 12+ & Cars from 2017(Grey)

(36)
$32.99
FREE delivery Jul 7 - 28
500+ bought in past month
Loading...
iPhone Charger Cord Lightning Cable (Apple MFi Certified) 6/6/10ft 3 Pack iPhone Cable Fast Charging Long Apple Charger Cable for iPhone 13 13 Pro 12 Pro 11 SE Max XS XR X, iPad Mini Air, iPod, AirPod

iPhone Charger Cord Lightning Cable (Apple MFi Certified) 6/6/10ft 3 Pack iPhone Cable Fast Charging Long Apple Charger Cable for iPhone 13 13 Pro 12 Pro 11 SE Max XS XR X, iPad Mini Air, iPod, AirPod

(4,371)
$9.99
FREE delivery Sat, Sep 20 on your first order
6K+ bought in past month
Loading...
Elebase USB to USB C Adapter 4 Pack,USBC Female to A Male Car Charger,Type C Converter for iPhone 16 Pro Max,15 14 13 12 11 Plus,Apple Watch iWatch 10 9 8,Airpods,iPad Air Mini 6 7,Samsung Galaxy S25

Elebase USB to USB C Adapter 4 Pack,USBC Female to A Male Car Charger,Type C Converter for iPhone 16 Pro Max,15 14 13 12 11 Plus,Apple Watch iWatch 10 9 8,Airpods,iPad Air Mini 6 7,Samsung Galaxy S25

(54,858)
$12.99
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

(2,190)
$18.99
FREE delivery Sat, Sep 20 on your first order
Loading...
ESR for iPhone 17 Pro Case with Stash Stand, Camera Control, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 17 Pro, Classic Hybrid Case (HaloLock), Clear

ESR for iPhone 17 Pro Case with Stash Stand, Camera Control, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 17 Pro, Classic Hybrid Case (HaloLock), Clear

(2)
$24.99
FREE delivery Sat, Sep 20 on your first order
Loading...
GuaGua Magnetic Case for iPhone 7 & iPhone 8 & iPhone SE 2022/2020 [Compatible with Magsafe] Translucent Matte Back Slim Thin Anti- Scratch Shockproof Protective Phone Cases for iPhone 8/7/SE-Black

GuaGua Magnetic Case for iPhone 7 & iPhone 8 & iPhone SE 2022/2020 [Compatible with Magsafe] Translucent Matte Back Slim Thin Anti- Scratch Shockproof Protective Phone Cases for iPhone 8/7/SE-Black

(87)
$12.77
FREE delivery Sat, Sep 20 on your first order
200+ bought in past month
Loading...
ESR for iPhone 16 Pro Max Case, Camera Control Capture Button, Compatible with MagSafe, Shockproof Military-Grade Protection, Phone Case for iPhone 16 Pro Max, Classic Hybrid Case(HaloLock), Clear

ESR for iPhone 16 Pro Max Case, Camera Control Capture Button, Compatible with MagSafe, Shockproof Military-Grade Protection, Phone Case for iPhone 16 Pro Max, Classic Hybrid Case(HaloLock), Clear

(87,497)
$11.99$10.96
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month