0.5.102 • Published 7 years ago

redchain v0.5.102

Weekly downloads
23
License
MIT
Repository
github
Last release
7 years ago

redchain Build Status Coverage Status

A library for manipulating state, but in a immutable way

First parameter is the initial state value. Second parameter is the reducer function which has to return the new state, or return the unchanged current state

The reducer will be called by the dispatch trigger, when value changed all listeners will be called.

import redchain from 'redchain';

const store = redchain(0, (previousState, action: number) => previousState + action);

console.log(store.state); // 0

store.dispatch(2);

console.log(store.state); // 2
0.5.102

7 years ago

0.5.101

7 years ago

0.5.73

7 years ago

0.5.43

7 years ago

0.5.27

7 years ago

0.5.26

8 years ago

0.5.25

8 years ago

0.5.21

8 years ago

0.5.19

8 years ago

0.5.18

8 years ago

0.5.17

8 years ago

0.5.7

8 years ago

0.5.6

8 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago