1.0.3 • Published 8 months ago

vue-infinite-scroll-component v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Vue Infinite Scroll Component

NPM License

Lightweight infinite scroll component for Vue < 5k 😎

infinite-scroll

Usage

npm i vue-infinite-scroll-component

<script setup>
import InfiniteScrollComponent from 'vue-infinite-scroll-component';
import 'vue-infinite-scroll-component/dist/style.css';

const options = {
  fetchData,
};

async function fetchData() {
  const res = await fetch('https://.../texts/works.json');
  return await res.json();
}
</script>


<template>
  <Suspense>
    <InfiniteScrollComponent :options="options" v-slot="slotProps">

      <!-- your component -->
      <ul>
        <li v-for="item in slotProps.items">
          {{item.title}}
        </li>
      </ul>

    </InfiniteScrollComponent>
  </Suspense>
</template

Contact

Feel free to ping me 💫 connect@giladshohat.com

giladshohat.com

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago