Built on top of react-redux, remove all boilerplate code and keep the best part of react-redux

Usage no npm install needed!

<script type="module">
  import autoReactRedux from '';



Override some react-redux functions to auto-generate, connect, dispatch store, state ...

- No more actions, actions creator, just use the direct name of reducer
- No more: action, type ... just create a reducer with first param: state, followed by other args
- No more dispatch, no more mapStateToProps ... just use listen for re-render when state changed
- Full compatible with React-redux so we can use Redux debug tool for debugging

Example of usage:

import {createAutoReduxStore} from "./auto-redux";

let todoReducers = {
  addTodo: (state, todo) => [...state, todo]

let appStore = {
  todos: {reducers: todoReducers, default: []},

const $store = createAutoReduxStore(appStore);

class Todo extends React.Component {
  render() {
      return <button onClick={$store.addTodo('New task')}>
          {$ => <div>{todo}</div>)}

export default listen(todos)(Todo);