All 12 useState & useEffect Mistakes Junior React Developers Still Make in 2026

ByteGrad August 21, 2023
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

👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). 👉 Add auth to your app FAST: https://bit.ly/3QOe1Bh 👉 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 👉 Discord: all my courses have a private Discord where I actively participate 🔔 Email newsletter (BIG update soon): https://email.bytegrad.com ⏱️ Timestamps: 0:00 Intro 0:06 12/12 - State updates aren't immediate 2:35 11/12 - Conditional rendering 4:46 10/12 - Updating object state 7:59 9/12 - 1 Object state instead of multiple smaller ones 11:25 8/12 - Information can be derived from state / props 14:32 7/12 - Primitives vs non-primitives 19:05 6/12 - Initializing state with object 22:12 5/12 - TypeScript mistakes 27:19 4/12 - Not using custom hooks 30:59 3/12 - Server & Client components 33:08 2/12 - Stale closure 38:42 1/12 - Fetching in useEffect #webdevelopment #programming #coding 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)

Unleash Bubble Wrap Fun

AI-recommended products based on this video

Loading...
Lehoo Castle Bubble Machine for Bathtub, Baby Bath Toys, Dinosaur Toys for 2 3 Year Old Boys Girls, Toddler Toys with Melody

Lehoo Castle Bubble Machine for Bathtub, Baby Bath Toys, Dinosaur Toys for 2 3 Year Old Boys Girls, Toddler Toys with Melody

(97)
$15.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Lehoo Castle Bubble Machine for Bathtub, Baby Bath Toys, Dinosaur Toys for 2 3 Year Old Boys Girls, Toddler Toys with Melody

Lehoo Castle Bubble Machine for Bathtub, Baby Bath Toys, Dinosaur Toys for 2 3 Year Old Boys Girls, Toddler Toys with Melody

(97)
$15.99
FREE delivery Sat, Jun 14 on your first order
Loading...
[2+2] UniqueMe Compatible with Samsung Galaxy S25 Plus Screen Protector, 2 Pack Tempered Glass Screen Protector + 2 Pack Camera Lens Protector with Easy Installation Frame, Anti Scratch Bubble Free

[2+2] UniqueMe Compatible with Samsung Galaxy S25 Plus Screen Protector, 2 Pack Tempered Glass Screen Protector + 2 Pack Camera Lens Protector with Easy Installation Frame, Anti Scratch Bubble Free

(112)
$9.99
FREE delivery Sat, Jun 14 on your first order
Loading...
LK 3 Pack for Top 9H+ Samsung Galaxy S26 Ultra Screen Protector, 12FT Military Grade Shatterproof Tempered Glass Screen Protector S26 Ultra with Easy Install Frame, 0 Bubble, Fingerprint Unlock

LK 3 Pack for Top 9H+ Samsung Galaxy S26 Ultra Screen Protector, 12FT Military Grade Shatterproof Tempered Glass Screen Protector S26 Ultra with Easy Install Frame, 0 Bubble, Fingerprint Unlock

(10,892)
$10.79
FREE delivery Tue, Mar 24 on your first order
1K+ bought in past month
Loading...
ivoler 2 Pack Tempered Glass for iPhone 17 Pro 6.3 Inch Screen Protector with [Easy Installation Frame] Full-Coverage, 9H Hardness Anti Scratch, Bubble Free

ivoler 2 Pack Tempered Glass for iPhone 17 Pro 6.3 Inch Screen Protector with [Easy Installation Frame] Full-Coverage, 9H Hardness Anti Scratch, Bubble Free

(21,832)
$9.49
Prime
2K+ bought in past month
Loading...
ivoler 2 Pack Tempered Glass for iPhone 17 Pro Max 6.9 Inch Screen Protector with [Easy Installation Frame] Full-Coverage, 9H Hardness Anti Scratch, Bubble Free

ivoler 2 Pack Tempered Glass for iPhone 17 Pro Max 6.9 Inch Screen Protector with [Easy Installation Frame] Full-Coverage, 9H Hardness Anti Scratch, Bubble Free

(21,508)
$9.99
FREE delivery Thu, Sep 18 on your first order
300+ bought in past month
Loading...
3-Pack, XunyLyee Screen Protector for iPhone 13/13 Pro/iPhone 14/ iPhone 16e 2025 6.1 Inch Tempered Glass Film Bubble Free

3-Pack, XunyLyee Screen Protector for iPhone 13/13 Pro/iPhone 14/ iPhone 16e 2025 6.1 Inch Tempered Glass Film Bubble Free

(275)
$7.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
[2+2 Pack] UniqueMe Screen Protector for Samsung Galaxy S25 with Camera Lens Protector, Anti-Scratch, Fingerprint ID Compatible, HD Clear Tempered Film, Easy to Install, Bubble Free, Case Friendly

[2+2 Pack] UniqueMe Screen Protector for Samsung Galaxy S25 with Camera Lens Protector, Anti-Scratch, Fingerprint ID Compatible, HD Clear Tempered Film, Easy to Install, Bubble Free, Case Friendly

(273)
$10.39
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
[2+2] LK 2 Pack Compatible for iPhone 16 Screen Protector + 2 Pack Camera Lens Protector, Tempered Glass Film, Ultra HD, 9H Hardness, Bubble Free, Easy Installation, Case Friendly

[2+2] LK 2 Pack Compatible for iPhone 16 Screen Protector + 2 Pack Camera Lens Protector, Tempered Glass Film, Ultra HD, 9H Hardness, Bubble Free, Easy Installation, Case Friendly

(66,622)
$13.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

(144)
$39.99
PrimeFREE delivery Sat, Jun 14
Loading...
Lubardy Beach Bags for Women Large Waterproof Sandproof Beach Tote Bag with Zipper Swim Pool Neoprene Beach Bag for Vacation Travel

Lubardy Beach Bags for Women Large Waterproof Sandproof Beach Tote Bag with Zipper Swim Pool Neoprene Beach Bag for Vacation Travel

(14)
$19.99
FREE delivery Sat, Jun 14 on your first order
Loading...
HUANLANG Nylon Crossbody Bags for Women Large Lightweight Travel Purse Waterproof Multi Pocket Shoulder Bag

HUANLANG Nylon Crossbody Bags for Women Large Lightweight Travel Purse Waterproof Multi Pocket Shoulder Bag

(207)
$29.99
Prime$6.08 delivery Sun, Jun 15
Loading...
Wedama 3-Pack TSA Approved Toiletry Bags - PVC Cosmetic Bags with Double Zipper, Large Opening, Handles; Black

Wedama 3-Pack TSA Approved Toiletry Bags - PVC Cosmetic Bags with Double Zipper, Large Opening, Handles; Black

(1,192)
$14.99
$10.98 delivery Jul 2 - 22
Loading...
[2+2 Pack] UniqueMe Screen Protector for Samsung Galaxy S25 with Camera Lens Protector, Anti-Scratch, Fingerprint ID Compatible, HD Clear Tempered Film, Easy to Install, Bubble Free, Case Friendly

[2+2 Pack] UniqueMe Screen Protector for Samsung Galaxy S25 with Camera Lens Protector, Anti-Scratch, Fingerprint ID Compatible, HD Clear Tempered Film, Easy to Install, Bubble Free, Case Friendly

(273)
$10.39
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
amFilm (3-Pack) Tempered Glass Screen Protector Compatible with Nintendo Switch 2 model 2025-7.9 inch, Case Friendly, Bubble Free

amFilm (3-Pack) Tempered Glass Screen Protector Compatible with Nintendo Switch 2 model 2025-7.9 inch, Case Friendly, Bubble Free

(30,322)
$12.59
FREE delivery Mon, Jul 7 on your first order
4K+ bought in past month
Loading...
[2+2] LK 2 Pack Compatible for iPhone 16 Screen Protector + 2 Pack Camera Lens Protector, Tempered Glass Film, Ultra HD, 9H Hardness, Bubble Free, Easy Installation, Case Friendly

[2+2] LK 2 Pack Compatible for iPhone 16 Screen Protector + 2 Pack Camera Lens Protector, Tempered Glass Film, Ultra HD, 9H Hardness, Bubble Free, Easy Installation, Case Friendly

(66,622)
$13.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month