loose coupling

Designing parts of a system so they depend on each other as little as possible and can change independently.

In more detail

Loosely coupled parts talk through small, stable interfaces such as events or messages instead of reaching into each other's internals. That lets one part be replaced or changed without breaking the others.

Examples

In this course: a cart component listens for a cart-add CustomEvent without importing the product card that sends it, and container queries decouple a component's layout from the page.
Headless components decouple behaviour from styling, render props decouple logic from markup, and custom hooks decouple stateful logic from any one component.

Related terms

Taught in

References

Certification courses