From the course: Web Components and Modularization: Practical Approaches
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Raw output
From the course: Web Components and Modularization: Practical Approaches
Raw output
- [Instructor] When building a component, I find it useful to start at the very end with a prototype of the output I want to be added to the dump. To make this happen, I build a basic component that does only one thing: return an output, the data or HTML, as intended, and use dummy data to make it all work. This serves two purposes. First off, it makes it easy to check that the component works and is added where it's supposed to. And second, it gives me a solid baseline to work from as I build out the component functionality. Writing out this desired HTML in plain text also helps me fully conceptualize in my mind exactly what needs to be done for everything to work properly. Let's take a look at a real life practical example, using React. Going back to the BookCarousel component, you can see this in practice. I've set it up here. We have the BookCarousel component, and inside the actual component I'm just…
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.