Giter Site home page Giter Site logo

polymorphic-redux's Introduction

No more switch statements!

This is a wrapper around reducers and action_types, which helps you work with redux in a OOP way, specifying Events and writing only the required logic, with minimal boilerplate.

This still doesn't solving the fundamental problems of working with redux

Redux is not a plugin to the application. Redux forces you to work in a certain way under a certain architecture (which is good IMO) but doesn't allow you to easily do TDD. Which means by definition any code you write right away becomes legacy. You cannot refactor easily and you have tight coupling between things which should be separated.

By writing the tests first, you quickly define what you need and can disregard all other as unnecessary clutter. This isn't possible using redux, as you must create your store, actions and reducer before even writing a simple use-case test.

So, where do we go from here?

We're working on a series of blog posts describing this problem in detail and the solution we think we have. The true benefit of redux in react apps is the automatic UI reactions you get when updating the state. This is can be perfectly accomplished using any other library (for example mobx) while the logic and app state can be constructed and structured in a clean way, without any boilerplate, using tests as our guide.

see https://github.com/wix/remx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.