Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krakenui/octopus-immutable-store
Customize immutable redux store by KrakenTeam!!!
https://github.com/krakenui/octopus-immutable-store
Last synced: about 2 months ago
JSON representation
Customize immutable redux store by KrakenTeam!!!
- Host: GitHub
- URL: https://github.com/krakenui/octopus-immutable-store
- Owner: krakenui
- Created: 2020-12-22T03:29:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T17:11:32.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T06:21:45.395Z (2 months ago)
- Language: TypeScript
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# octopus-immutable-store
[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/octopus-immutable-store.svg?style=flat-square
[npm-url]: http://npmjs.org/package/octopus-immutable-store
[download-image]: https://img.shields.io/npm/dm/octopus-immutable-store.svg?style=flat-square
[download-url]: https://npmjs.org/package/octopus-immutable-store## Install
[![octopus-immutable-store](https://nodei.co/npm/octopus-immutable-store.png)](https://npmjs.org/package/octopus-immutable-store)
```
npm install --save octopus-immutable-store
```## Features
```
- Customize immuatble redux store
- Durable redux store
```## Install
- Install octopus-immutable-store
```
npm install octopus-immutable-store
```## How it work
#### Override process env
- Init redux store instance:
```
import { initRootStore } from "octopus-immutable-store";initRootStore(store);
```- Get current state:
```
import { getRootState } from "octopus-immutable-store";getRootState();
```- Dispatch a action as root:
```
import { rootDispatch } from "octopus-immutable-store";rootDispatch(type, payload);
```- Dispatch a debounce action as root:
```
import { debounceRootDispatch } from "octopus-immutable-store";debounceRootDispatch(type, payload, wait = 2000);
```## LICENSE
MIT