Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Utilities and helpers for our javascript application stack

Notifications You must be signed in to change notification settings

iZettle/javascript-app-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javascript-app-utils

Utilities and helpers for javascript applications developed with React, Redux and RxJS.

combineModules()

Combine modules that has a reducer and/or an epic:

import { applyMiddleware, createStore } from "redux"
import { createEpicMiddleware } from "redux-observable"
import { combineModules } from "@izettle/app-utils"
import * as modules from "./modules"

const rootModule = combineModules(modules)

const store = createStore(rootModule.reducer, {}, applyMiddleware(
  createEpicMiddleware(rootModule.epic)
))

Modules must look like this:

const exampleModule = {
  name: "example",
  reducer: (state, action) => state,
  epic: action$ => action$
}

About

Utilities and helpers for our javascript application stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published