Radio and PodcastRadio and PodcastLive Radio & Podcasts
Controlled and uncontrolled components artwork
Technology

Controlled and uncontrolled components

Frontend First by Frontend First

Aug 28, 202400:47:25Technology

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 Re...

About This Episode

Controlled and uncontrolled components is an episode from Frontend First by Frontend First. Sam and Ryan discuss controlled and uncontrolled components in React. They talk about how uncontrolled components can be thought of as components th...

Podcast

This episode belongs to Frontend First.

Listen Online

Use the player on this page to stream the episode online.

Episode Details

Published Aug 28, 2024, 00:47:25 long, audio available.

Questions About This Episode

What is Controlled and uncontrolled components about?

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 - Intro 1:41 - What are controlled and uncontrolled components? 6:11 - How to change a component from uncontrolled to controlled 8:48 - How do you decide when to use a controlled or uncontrolled component? 12:00 - Sortable table example and a single source of truth 15:27 - Is it always either controlled or uncontrolled? 21:09 - Color picker example and not exposing internal state 28:46 - Sortable list example with Framer Motion 39:45 - Component boundaries and wearing two hats: the library author vs. library consumer 41:43 - How do you know if you are using the wrong approach? Links: New course: Advanced React Component Patterns React docs: Controlled and uncontrolled components React docs: Storing state from previous renders Email Sam Email Ryan Frontend First on Twitter

Where can I listen to Controlled and uncontrolled components?

You can listen to Controlled and uncontrolled components online on Radio and Podcast. Open the player on this page to stream the available audio.

Which podcast is Controlled and uncontrolled components from?

Controlled and uncontrolled components is an episode from Frontend First by Frontend First.

How long is this episode?

This episode is 00:47:25 long.

When was this episode published?

This episode was published on Aug 28, 2024.

Can I save Controlled and uncontrolled components for later?

Yes. Use the heart button on the episode page to add it to your favorite episodes list.

Are there related episodes from Frontend First?

Yes. This page shows related episodes from Frontend First when more episodes are available from the podcast feed.

Quick Answers About This Episode

Where can I listen to Controlled and uncontrolled components?

You can listen to Controlled and uncontrolled components on this page when the episode audio is available from the podcast feed.

Which podcast is this episode from?

Controlled and uncontrolled components is from Frontend First by Frontend First.

What are the episode details?

Published Aug 28, 2024 and 00:47:25 long