Skip to content

Getting Started

Skayo edited this page Jul 30, 2020 · 6 revisions

Installation

If you're using this component in a Sapper application, make sure to install the package to devDependencies!
More Details

With npm:

$ npm install svelte-infinite-loading

With yarn:

$ yarn add svelte-infinite-loading

Or, what I would recommend, with pnpm:

$ npm i -g pnpm
$ pnpm install svelte-infinite-loading

Import

Just import it as a svelte component:

<script>
  import InfiniteLoading from 'svelte-infinite-loading';
</script>

<div>
  {#each list as item}
    <!-- List Items -->
  {/each}
  
  <InfiniteLoading />
</div>
Clone this wiki locally