vue-observe-visibility | Detect when an element | Frontend Plugin library
kandi X-RAY | vue-observe-visibility Summary
kandi X-RAY | vue-observe-visibility Summary
Detect when an element is becoming visible or hidden on the page.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a new throttled error handler
vue-observe-visibility Key Features
vue-observe-visibility Examples and Code Snippets
Community Discussions
Trending Discussions on vue-observe-visibility
QUESTION
I have an ecommerce online store that has categories with items and one page with all items available (in stock).
Some categories have close to 1500 items. The page with all products available has close to 4000 items.
I can load everything with the api very fast, the payload of the items is delivered in 50ms to 300ms (size of 90kb, the larger).
Only 30 items are show at the start. I use vue-observe-visibility to load more when the user scrolls to the bottom of the page. So it loads 30 items "per page" or "view".
The items use a item component where I loop through. Example
...ANSWER
Answered 2021-Sep-10 at 15:16tips to improve the performance of a list:
- use the virtual scroller component
- do not use v-if inside a v-for, especially if the list is huge, use always the v-show.
In this specific case, you can handle it in this way
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-observe-visibility
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page