Redux Code Generator
An application to generate redux code based on initial states.
You love redux where everything is simple and explicit, but you hates to write so many codes just to do a operation. Introducing abstration may reduce the code, but it is no longer simple and explicit.
This is a web application that takes your reducer default state as input, and produces the following codes:
action-keys- the constants to shared between your actions and reducer
actions- all the action creators
reducer- the reducer
selectors- selectors to query data from your store
unit tests- Jest unit tests that test action creators, reducer, and selectors together
- Enter your initial state json into the "Initial State" text field. All the code will be generated!
- If you would like to prefix your store/actions/reducer, use the "Store Prefix" field.
- It is assumed that the initial state is a plain object (not array).
- It is fine to have array in your state, but this application could not handle another array as descendent of array. (It is bad practice to have such redux store anyway).
- Unit tests only support Jest