Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 804 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 804 Bytes

Svelte Param Store

A store helping you synchronize your app state and the URL!

Visit the npm page at svelte-param-store

Acknowledgments

The documentation for this package was heavily inspired by Svelte Sonner

Quick start

Install it:

npm i svelte-param-store
# or
yarn add svelte-param-store
# or
pnpm add svelte-param-store

Create a variable with:

<script>
  import { useParamStore } from 'svelte-param-store' 
  
  let name = useParamStore('name')
</script>

Bind it to an input:

<input type='text' bind:value={$name}>

Documentation

You can find a more detailed documentation as well as a full demo at Svelte Param Store