From the course: Web Components and Modularization: Practical Approaches
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Plan before you code
From the course: Web Components and Modularization: Practical Approaches
Plan before you code
- [Narrator] The more planning you do ahead of building a component the less work you need to do tinkering with that component to make it function as intended and do what you needed to do. I said earlier in the course, I often think of components as blocks, I put together to create a view. That's a high level of view of components suited for initial planning. Now, that we're down at the code level components are more like small machines that receive input and produce outputs. This is unimportant mental model because unlike standard HTML elements, when you work with components you can make your components do very complicated things well beyond simply displaying some content according to a template. Components can perform data queries and transformations that can trigger local or even site-wide changes. They can display animations and handle form inputs and process media, and do literally anything you can do with HTML,…
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)
Plan before you code1m 25s
-
(Locked)
Raw output2m 32s
-
(Locked)
Properties1m 49s
-
(Locked)
Input and output3m 27s
-
(Locked)
State2m 7s
-
(Locked)
Who owns state?2m 11s
-
(Locked)
Life cycle1m 18s
-
(Locked)
Challenge: Scope a complex component1m 20s
-
(Locked)
Solution: Scope a complex component5m 5s
-
(Locked)
-
-