Listen "What is a React Component?"
Episode Synopsis
Building on our simple React app, Aurooba demonstrates a component and sets up state to track variables. While discussing return statements, Brian cringes about JSX and mixing HTML with JavaScript. They also discuss how a function can return more than one variable in modern JavaScript.A full transcript of the episode is available on the website. Watch the video podcast on YouTube and subscribe to our channel and newsletter to hear about episodes (and more) first!The source code from the episode – https://github.com/viewSourcePodcast/viewSource-blocks/tree/add/accordion-block@wordpress/scripts – https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/@wordpress/element - https://developer.wordpress.org/block-editor/reference-guides/packages/packages-element/Brian's website – https://www.briancoords.comAurooba's website – https://aurooba.com
(00:00) - Introduction
(01:10) - The Return in React Components
(07:39) - Setting up State with @wordpress/element
(10:25) - Destructuring and Getting Multiple Values from a Function
(14:05) - Calling Event Functions in JSX
(16:06) - Frontend Recap and Next Steps
More episodes of the podcast viewSource
Font Library in WordPress 6.5
01/04/2024
Diving into the Next.js 14 App Router
19/02/2024
Building a Next.js Application - Part 2
05/02/2024
Next.js Part 1.5
22/01/2024
Building with Next.js - Part 1
08/01/2024
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.