6.2.1 • Published 3 years ago

redux-subspace-saga v6.2.1

Weekly downloads
437
License
BSD-3-Clause
Repository
github
Last release
3 years ago

redux-subspace-saga

Deprecated

This library is no longer being actively maintained.

IOOF has been slowly moving away from the ubiquitous use of Redux as a core piece of our micro-frontend architecture and have been actively replacing the usage of this library with more standard React and JavaScript patterns. Due to some technical constraints, we've also been unable to upgrade to the latest version of the library ourselves for quite some time now, further fuelling our desire to move away from this solution.

At this time, we will be ceasing all maintenance tasks and we recommend that you consider using an alternative library:

If you want to continue using this library, we encourage you to fork this repo and take over maintenance yourself.


npm version npm downloads License: BSD-3-Clause

This is an extension for redux-subspace to create subspaces for sagas. It's designed to work with redux-saga middleware.

Installation

npm install --save redux redux-saga redux-subspace redux-subspace-saga

Quick Start

import { createStore, combineReducers } from 'redux'
import { namespaced, applyMiddleware } from 'redux-subspace'
import createSagaMiddleware, { subspaced } from 'redux-subspace-saga'
import { all } from 'redux-saga/effects'
import { todoReducer, todoSaga } from './todoApp'
import { counterReducer, counterSaga } from './counterApp'

const rootReducer = combineReducers({
  todo: todoReducer
  counter1: namespaced('counter1')(counterReducer),
  counter2: namespaced('counter2')(counterReducer)
})

const sagaMiddleware = createSagaMiddleware()

const store = createStore(rootReducer, applyMiddleware(sagaMiddleware))

const subspacedTodoSaga = subspaced((state) => state.todo)(todoSaga)
const subspacedCounter1Saga = subspaced((state) => state.counter1, 'counter1')(counterSaga)
const subspacedCounter2Saga = subspaced((state) => state.counter2, 'counter2')(counterSaga)

function* rootSaga() {
  yield all([
    subspacedTodoSaga(),
    subspacedCounter1Saga(),
    subspacedCounter2Saga()
  ])
}

sagaMiddleware.run(rootSaga)

Documentation

6.2.1

3 years ago

6.2.0

3 years ago

6.1.0

5 years ago

6.0.0

5 years ago

5.0.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

3.0.0-alpha.1

6 years ago

3.0.0-alpha.0

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.4.0-0

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.6-alpha

7 years ago

2.0.5-alpha

7 years ago

2.0.4-alpha

7 years ago

2.0.3-alpha

7 years ago

2.0.2-alpha

7 years ago

2.0.1-alpha

7 years ago

2.0.0-alpha

7 years ago