Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

project-cemetery/redux-clear

Repository files navigation

redux-clear

Instalation

yarn add redux-clear

Usage

import { createClearRedux, ClearAction } from 'redux-clear'

type State = number
interface Actions {
  addAndMult: ClearAction<[number, number]>
}

const { actions, reducer } = createClearRedux<State, Actions>(
  {
    addAndMult: state => (amount, param) => state + amount * param,
  },
  0,
)

actions.addAndMult(12, 2) // just didpatch it
reducer // just pass it to `combineReducers`

Easy fetching

import { createClearReduxWithFetching, ClearAction } from 'redux-clear'

// TODO: add example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published