What is a React Component?
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.com
- Aurooba's website – https://aurooba.com
Creators and Guests
![Aurooba Ahmed](https://img.transistor.fm/FDScxrG6rzuewGKTKtECFlX5Aztg9WWvdh_8978Fa6U/rs:fill:400:400:1/q:60/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS9wZXJz/b24vNWM0ZjhlMWEt/ZDRlOC00MTE0LWIy/YzktZjJmZWIyNmEz/NmFjLzE2OTU2NTcy/NzMtaW1hZ2UuanBn.webp)
Host
Aurooba Ahmed
(she/her) Developer building bespoke #WordPress solutions, tools, and blocks. My name is pronounced "oo-ROO-ba" — Default to kindness, folks.
![What is a React Component?](https://img.transistor.fm/zoHMPI_T3VF92S2ZMjFyfVDNJsO2eky408MRnZHmIpY/rs:fill:800:800:1/q:60/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS9zaG93/LzM1OTI5LzE2Njgw/MjQ3NzctYXJ0d29y/ay5qcGc.webp)