Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garethoates/svelte-dev-store
This project adds the ability to use Redux Dev tools to visualise a Svelte store. It uses redux under the hood and should only be used in a development environment.
https://github.com/garethoates/svelte-dev-store
redux redux-dev store svelte sveltejs
Last synced: 25 days ago
JSON representation
This project adds the ability to use Redux Dev tools to visualise a Svelte store. It uses redux under the hood and should only be used in a development environment.
- Host: GitHub
- URL: https://github.com/garethoates/svelte-dev-store
- Owner: GarethOates
- License: mit
- Created: 2018-01-24T19:54:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T14:33:38.000Z (over 4 years ago)
- Last Synced: 2024-04-24T02:01:32.678Z (7 months ago)
- Topics: redux, redux-dev, store, svelte, sveltejs
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Svelte Dev Store
[![npm](https://img.shields.io/npm/v/svelte-dev-store.svg)]()
[![npm](https://img.shields.io/npm/dm/svelte-dev-store.svg)]()
[![Twitter Follow](https://img.shields.io/twitter/follow/garethoates.svg?style=social&label=Follow)](https://www.twitter.com/garethoates)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.