Redux Mastermind

Clean State Management for your Redux Store

  • The core concepts are Transparency and Simplicity
  • The library is Flexible, Light, and Extensible
  • The docs stay up to date 🙏

And Here's Why You Should Use It...

Transparency of all UI Events

In most applications, to see how a single UI event works, you have to look through several files spread out over several folders. This makes maintaining and reasoning about your application tedious and difficult very quickly. Redux Mastermind lets you define every aspect of an interaction, from start to finish, in a single place.

tldr

Problem: interactions spread out over many files and folder. Hard to maintain, hard to reason about.

Solution: interactions defined in a single place from start to finish, using expressive and descriptive language. Easy to understand, easy to maintain.

                
// example updateSchema creation function 
// (aka an updateSchemaCreator)
function createAndCompleteATodo (id, title, text) {
  const todo = { 
    id: id,
    title: title, 
    body: text,
    complete: false 
  }
  return {
    description: 'creates an uncompleted to, then completes it',
    updater: 'store',
    actions: {
      createTodo: {
        description: 'creates a single todo',
        branch: 'todos',
        location: ['data', id],
        operation: 'setIn',
        value: todo,
      },
      completeTodo: {
        description: 'makes a todo complete status true',
        branch: 'todos',
        location: ['data', id],
        updateIn: function ({}, value) {
          value = value.toJS()
          value.complete = true
          return value 
        },
        uiEventFunction: function ({ alertify }) {
          return alertify.success('Congratulations on completing an event!')
        } 
      }
    }
  }
}