Skip to content

Latest commit

 

History

History
77 lines (72 loc) · 1.68 KB

README.org

File metadata and controls

77 lines (72 loc) · 1.68 KB

Redux Templates

Packages used

typesafe-actions

https://github.com/piotrwitek/typesafe-actions

redux

https://github.com/reduxjs/redux

redux-saga

https://github.com/redux-saga/redux-saga

reselect

https://github.com/reduxjs/reselect

Generated structure description

Generators

store

Create template for adding store to project

module

new

Creates new module and connects it to store. Every module is constructed from following files:

  • actions.ts
  • constants.ts
  • effects.ts
  • index.ts
  • reducers.ts
  • selectors.ts
  • types.ts

Usage

hygen module new --name entries

action

action

Creates simple action without payload and connects it to reducer.

action-with-payload

Creates simple action with payload and connects it to reducer.

async-action

Creates asynchronous action with payload and connects it to reducer. Every action has following sub-types:

  • REQUEST
  • SUCCESS
  • ERROR
  • CANCEL

Usage

hygen action async-action --moduleKind modules --moduleName entries --name addEntry

effect

new

Creates saga for given action.

Usage

hygen effect new --moduleKind modules --moduleName entries --name addEntry

reducer

new

Creates

selector

memoized

Creates memoized selector for given module.

simple

Creates simple selector for given module.

Usage

hygen selector memoized --moduleKind modules --moduleName entries --name getEntries

Editor tooling

IN-PROGRESS Emacs

  • [ ] refactor and write documentation
  • [ ] publish