Reusable Components in React

Опубликовано: 10 Апрель 2023
на канале: viewSource
494
17

Aurooba and Brian convert their simple React accordion into separate, reusable components and discuss the importance of components as foundational parts of the web. Next, they show how to use React devtools in Chrome to quickly examine and debug your components. Finally, they dig into the code with a focus on passing and destructuring the data you pass via props.

A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter (https://viewsource.fm/subscribe) to hear about episodes (and more) first!

Code from this episode - https://github.com/viewSourcePodcast/...
React Developer Tools - https://react.dev/learn/react-develop...
Brian's website – https://www.briancoords.com
Aurooba's website – https://aurooba.com

00:00:00 Introduction
00:01:19 Components as foundational parts of the web
00:03:33 Recap of our series so far
00:04:15 Using React devtools in Chrome
00:08:31 Our AccordionItem Component
00:13:32 Passing props and destructuring
00:19:20 How many components is too many?
00:23:46 Balancing and planning different approaches in React
00:26:48 What comes next? A preview on state and interactivity