From the course: Building UI Components with Storybook: Master React Components and UI Design with Storybook for Better Efficiency
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Exercise: Build a React component
From the course: Building UI Components with Storybook: Master React Components and UI Design with Storybook for Better Efficiency
Exercise: Build a React component
There's nothing like a delicious cup of coffee and writing a React component. It's like one of the magical mysteries of life. Hard to describe why. Put them together and you just live in the dream. Good to be back with you. Hope you're comfortable and ready to keep and eager to continue. And hopefully this is making sense. Where we left off here, we've got this homepage component now that has a sub-component as a title, which we're passing properties over. We set the properties up in the title, and in our title, then we just pass those properties. Now, you could use other names, but props is basically a standard and widely accepted convention of passing the data over from our parent component to our child component. The parent component is the homepage, right? This is the father, and title is a child because it's within it and title has some property data the title being set to this text and then that's getting passed over with props props and notice we grab the title from props this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Important note on the upcoming sections3m 20s
-
(Locked)
What is the DOM and what is the React Virtual DOM? React fundamentals8m 31s
-
(Locked)
How to start building a React app with CRA4m 2s
-
(Locked)
CRA: React files and dependencies, an overview8m 51s
-
(Locked)
How to connect the root of React to the DOM and rendering React application6m 59s
-
(Locked)
Running a local development server of React9m 10s
-
(Locked)
What are functional components in React11m 2s
-
(Locked)
Quick observation on ECMAScript standards with React3m 36s
-
(Locked)
The React component tree and composite components8m 34s
-
(Locked)
How props work in React7m 6s
-
(Locked)
Exercise: Build a React component7m 50s
-
(Locked)
What are hooks in React12m 24s
-
(Locked)
Input dynamic tests and events with React9m 20s
-
(Locked)
Event handling practice and section summary12m 41s
-
(Locked)
-
-
-
-
-