Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Releases: dannypsnl/redux

v2.2.3

26 May 02:35
Compare
Choose a tag to compare
  • FIX: subscribe functions won't be called correctly

v2.2.2

02 Jun 18:33
22b8ac8
Compare
Choose a tag to compare

remove the dependency about github.com/dannypsnl/assert since it already is removed

v2.2.1

13 Dec 10:15
Compare
Choose a tag to compare

fix: support go module now

v1.5.3

13 Dec 10:16
Compare
Choose a tag to compare

fix: support go module

v2.2.0

14 Oct 00:22
2637290
Compare
Choose a tag to compare
v2.2.0 Pre-release
Pre-release

At before we use rematcher.Action(rematcher.ReducerMethod).With(payload) to generate our action for dispatching, now we just add a field with action tag, the format is: action:"ReducerMethodName"

Example:

type CountModel struct {
    Reducer
    State int

    Increase *rematch.Action `action:"IncreaseMethod"`
}

func (c *CountModel) IncreaseMethod(s, payload int) int {
    return s + payload
}

// main
c := &CountModel{State: 0}
store.New(c)
store.Dispatch(c.Increase.With(10))
fmt.Printf("%d", store.StateOf(c)) // 10

v2.1.2

05 Jul 02:49
Compare
Choose a tag to compare

fix:

improving performance by moving job to only executing once part.

v2.1.1

01 Jul 07:01
Compare
Choose a tag to compare

improving store

v2.1.0

26 Jun 06:52
Compare
Choose a tag to compare

feature: rematch, ref #48

type CountingModel struct {
	rematch.Reducer
	State int
}

func (cm *CountingModel) Increase(s, payload int) int {
	return s + payload
}

func (cm *CountingModel) Decrease(s, payload int) int {
	return s - payload
}

func main() {
	c := &CountingModel{
		State: 0,
	}
	store := store.New(c)
	store.Dispatch(c.Action(c.Increase).With(100))
	store.Dispatch(c.Action(c.Decrease).With(50))

	fmt.Printf("result: %d\n", store.StateOf(c)) // expect: 50
}

v1.5.2

21 Jun 14:50
Compare
Choose a tag to compare

reducing duplicated code

v2.0.3

15 Jun 09:17
Compare
Choose a tag to compare

fix: warning message for duplicating reducer typo