Description
There are several built-in abstract components, such as transition
, keep-alive
. However, the official guide doesn't tell the developers that they could also create their own.
Here's a possible use case. If the user's network is very good, I may want to guess his/her behavior based on some rules, and prefetch some async data or routes. So I create a prefetch
abstract component. When the user really does what I have guessed, the UI could response immediately.
After read source code of the built-in abstract components, I found that there are pitfalls I didn't realize. For example, an abstract component may contain another abstract component. Then I start to worry whether I could use it the right way.
Is abstract
designed to be internal only, or is there any plan for the docs?