Skip to main contentredux-mvc

Module Composition

Modules can be composed together to reuse different functionalities.

Module Composition

  • To mix a module in follow this steps:

    1. Use the merge decorator from redux-mvc
    2. Continue creating the module as usual
    import * as R from "ramda"
    import { merge, createModule } from "@redux-mvc/core"
    import model from "./model"
    const CounterAndSearchbar = R.compose(
    createModule,
    ...
    merge(counter),

    Note: remember function composition works from right to left