I use immutable.JS to manage my repositories through redux-immutablejs. Now I would like to use the library of reduction forms, but I had a problem of combining reducers.
Redux-immutable provides a function combReducers, which checks whether all reducers are passed, return immutable objects.
Redux itself provides a combReducers function that does not perform such a check.
Redux-form requires you to enable your reducers, but I cannot do this using the immutable Redux combux files, as this will fail.
So, what I'm trying to do is basically combine the output of these two functions as follows:
import { combineReducers } from 'redux'; import { combineReducers as combineReducersUtils } from 'redux-utils'; import {reducer as formReducer} from 'redux-form'; const mainReducers = combineReducersUtils({ devices, alarms }); const extraReducers = combineReducers({ form: formReducer }); export default (mainReducers + extraReducers);
The last line obviously does not work, but basically illustrates what I need.
Thanks for taking the time to read this.
source share