svelte-dev-store

1.0.2 • Public • Published

Svelte Dev Store

npm npm Twitter Follow

This project allows you to use the Redux Dev Tools browser plugin when working with a Svelte store instance.

To use this package in your project as you develop, you simply import this package instead of the svelte/store and create an instance of the exported class, instead of 'Store'.

import SvelteDevStore from 'svelte-dev-store';

const myStore = new SvelteDevStore({name: 'Gareth'});

myStore.set({name: 'Bob'});
myStore.set({name: 'Jim'});
myStore.set({name: 'Jeff'});

Then when you open up the Redux dev tools, you should see 3 newState actions and the chart should show the structure of your svelte store.

svelteDevStore has the exact same API as the actual svelte/store. It just extends it to incorporate sending actions to a very simple redux store, that enables you to see it in the dev tools.

Package Sidebar

Install

npm i svelte-dev-store

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

5.67 kB

Total Files

6

Last publish

Collaborators

  • garethoates