PodParley PodParley
Controlled and uncontrolled components

EPISODE · Aug 28, 2024 · 47 MIN

Controlled and uncontrolled components

from Frontend First · host Frontend First

Sam and Ryan discuss controlled and uncontrolled components in React. They talk about how uncontrolled components can be thought of as components that manage their own internal state, why you should model your complex React components after the simpler APIs of native HTML elements like inputs, why you shouldn't try to make components that are both controlled and uncontrolled, and why making a new component boundary is sometimes all you need to make your custom components behave more predictably.Timestamps:0:00 - Intro1:41 - What are controlled and uncontrolled components?6:11 - How to change a component from uncontrolled to controlled8:48 - How do you decide when to use a controlled or uncontrolled component?12:00 - Sortable table example and a single source of truth15:27 - Is it always either controlled or uncontrolled?21:09 - Color picker example and not exposing internal state28:46 - Sortable list example with Framer Motion39:45 - Component boundaries and wearing two hats: the library author vs. library consumer41:43 - How do you know if you are using the wrong approach?Links:New course: Advanced React Component PatternsReact docs: Controlled and uncontrolled componentsReact docs: Storing state from previous rendersEmail SamEmail RyanFrontend First on Twitter

NOW PLAYING

Controlled and uncontrolled components

0:00 47:25
Play in mini player Transcript not yet generated

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

My Take On It with Your Angelic Karma® Your Angelic Karma Here we take a look at how the United States measures alongside other First World Nations. + taking a deep dive into the science -The Report The Ten Commandments Chad Boersema Many focus on MAKING disciples, we hope to help in the process of BEING a disciple of Jesus. Understanding the ten commandments can be a good place to reflect on, as they were one of Israel's first introductions to learning how to relate to God and live in His way. Jesus also references the commandments in his sermon on the mount saying, “...whoever does them [the commandments] will be called great in the kingdom of heaven.” (Matthew 5:19) Looking forward to exploring these with you! Thanks for listening!web - jesusdisciple.info facebook - facebook.com/jesusdisciple.info twitter - twitter.com/fellow_disciple instagram - instagram.com/jesusdisciple.info Healing & Storytelling iamshaerka Life can be hard but thank the Lord we don’t have to go at it with our strength alone. Life with Christ is my trials, tribulations, and testimonies in the race of faith with Christ Jesus. The goal is to get closer to Jesus with bible and life chat. So, let’s talk it out, walk it out and get right with our Lord and Savior of the world. No one is asking you to be perfect, just to try for the Lord. He loved us first, even when we were sinners so it's easy to love Him back. Let’s do life with Christ together! The Swim Ireland Podcast Swim Ireland The Swim Ireland Podcast takes you to the heart of Irish aquatics, with deep dives into coaching, high performance, and life in the water. Our podcasts come in series of six episodes, with our first launching in April 2021: The Coaching Series - getting to the nitty gritty of what it takes to coach the finest aquatic stars in Ireland in an Olympic & Paralympic year. Coming this summer...The Olympic Athlete Series and The Paralympic Athlete Series, where we talk directly to the Irish aquatic stars heading to Tokyo 2021. Subscribe to be first to know when they launch, and follow us on social media via @swimireland to be first to hear new releases.
URL copied to clipboard!