svelte-society / sveltesociety-utilities

A library of utilities, actions, components and stores for your Svelte projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte Society Utilities

A library of utilities, actions, components and stores for your Svelte projects

Usage

Stores

periodicFetch

This custom store will re-fetch from a URL every N (default 5000ms) seconds. Pass in url and time.

<script>
	import { periodicFetch } from 'sveltesociety/store'
	const url = "https://www.swapi.tech/api/people/";
	
	const starWarsPeople = periodicFetch(url)
</script>

<pre>{JSON.stringify($starWarsPeople, undefined, 2)}</pre>

REPL Example

About

A library of utilities, actions, components and stores for your Svelte projects


Languages

Language:TypeScript 45.6%Language:JavaScript 28.9%Language:Svelte 15.9%Language:HTML 9.6%