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.

Loose principles for tightly scoped components

Loose principles for tightly scoped components

From the course: Web Components and Modularization: Practical Approaches

Start my 1-month free trial

Loose principles for tightly scoped components

- [Instructor] One of the questions I asked all the people I interviewed in preparation for this course was what defines a component to you? The purpose of this question was to find what core principles people apply to components as they work with them in the real world, and whether those core principles line up with what documentation writers and educators like myself say about components. The good news is there was pretty much universal consensus about these principles likely because they just make sense. So what are the core principles of components? Here's a point-by-point overview. One-task principle, a component should only do one thing. Top-down principle, information flows one way from the top down. Isolation principle, components should neither know nor care about the state of other components they receive and send information, and that's it. And finally, stand-alone principle, a component should be standalone,…

Contents