Documentation ¶
Directories ¶
Path | Synopsis |
---|---|
Package action provides Action implementation for redux
|
Package action provides Action implementation for redux |
example should be empty, it's purpose is let example of doc can appear on godoc page
|
example should be empty, it's purpose is let example of doc can appear on godoc page |
v1
package v1
|
package v1 |
Package middleware provides middleware helper type for redux Example: func Logger(s *store.Store) middleware.Middleware { return func(next middleware.Next) middleware.Next { return func(act *action.Action) *action.Action { return next(act) } } }
|
Package middleware provides middleware helper type for redux Example: func Logger(s *store.Store) middleware.Middleware { return func(next middleware.Next) middleware.Next { return func(act *action.Action) *action.Action { return next(act) } } } |
rematch provide rematch API Example: func counter(s interface{}, a action.Action) interface{} { return reCounter.Reduce()(s, a) } func init() { reCounter = rematch.Reducer { State: 0, Reducers: rematch.Reducers { "INC": func(state interface{}, act action.Action) interface{} { return state.(int)+act.Args["payload"].(int) }, "DEC": func(state interface{}, act action.Action) interface{} { return state.(int)-act.Args["payload"].(int) }, } } } func main() { store := store.New(counter) store.Dispatch(reCounter.
|
rematch provide rematch API Example: func counter(s interface{}, a action.Action) interface{} { return reCounter.Reduce()(s, a) } func init() { reCounter = rematch.Reducer { State: 0, Reducers: rematch.Reducers { "INC": func(state interface{}, act action.Action) interface{} { return state.(int)+act.Args["payload"].(int) }, "DEC": func(state interface{}, act action.Action) interface{} { return state.(int)-act.Args["payload"].(int) }, } } } func main() { store := store.New(counter) store.Dispatch(reCounter. |
Package store provides the store implement for redux.
|
Package store provides the store implement for redux. |
Click to show internal directories.
Click to hide internal directories.