What is the principle of vue encapsulating components?

Recently,

has been thinking about a particularly fundamental question, what are the principles for encapsulating vue components,
, or why should this piece be encapsulated as a component?
is there a need to encapsulate components for pages with low reuse rates but more features?
I have only been in contact with vue for two months. Please give me some advice

Jul.02,2022

pages should not be encapsulated as components as far as possible, and only some parts with high reuse rate should be encapsulated as components. For example, the pop-up box for adding or modifying information needs to be used for seven or eight pages, so there is a natural reason to package it as a component. And to have high cohesion and low coupling, we should never rely on the logic of one or more pages

.
Menu