Essential React: 5 Mistakes to Master React DOM Refs

Published: 28 November 2023
on channel: UI Engineering
650
57

#reactjs
Guide through most common mistakes when using Refs to manipulate DOM in React.

📖 Concepts:
Why to use Refs, not DOM API selectors?
What is render and commit phase in React?
Why refs are called an escape hatch?
What aspects of DOM should be controlled by state and refs?

⏱️Timestamps:
00:00 - Video Outline
00:31 - Mistake #1 - Using DOM API selectors to query for DOM nodes
01:46 - Mistake #2 - Accessing DOM Ref before component mounts
02:36 - Mistake #3 - Accessing DOM Ref in render phase
06:34 - Mistake #4 - Accessing DOM Ref when component doesn't render it
10:00 - Mistake #5 - Modifying DOM directly where it should be managed by React

Icons: https://www.flaticon.com/


On this page of the site you can watch the video online Essential React: 5 Mistakes to Master React DOM Refs with a duration of hours minute second in good quality, which was uploaded by the user UI Engineering 28 November 2023, share the link with friends and acquaintances, this video has already been watched 650 times on youtube and it was liked by 57 viewers. Enjoy your viewing!