A Redux combineReducers equivalent that works with Immutable.js state.
redux-immutable is a utility library that provides a Redux `combineReducers` function compatible with Immutable.js state. It solves the problem where Redux's default `combineReducers` expects a plain JavaScript object as state, causing errors when using Immutable.js collections. This allows developers to maintain immutable state structures while leveraging Redux for state management.
Frontend developers using Redux with Immutable.js for state management, particularly those building applications where immutable data structures are preferred for performance or predictability.
Developers choose redux-immutable because it seamlessly integrates Immutable.js with Redux, avoiding the errors that occur when using Immutable.js state with Redux's default `combineReducers`. It provides a drop-in solution that maintains the benefits of both libraries without requiring workarounds.
redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a drop-in combineReducers replacement that works with Immutable.js collections like Map and List, preventing Redux errors when state is immutable.
Allows specifying a custom getDefaultState function, enabling the use of Immutable.Record for structured defaults and delegation to child reducers, as shown in the README examples.
Includes practical code snippets for integrating with react-router-redux v4 and v5, helping developers handle common routing scenarios with Immutable.js state.
Extends Redux without modifying core library behavior, maintaining compatibility with existing Redux tools and middleware when initial state is Immutable.js.
Integration with react-router-redux requires custom reducer implementations, as admitted in the README, adding complexity and maintenance burden.
Depends on Immutable.js, which adds around 60KB minified, potentially affecting load times and performance for lightweight applications.
With Redux Toolkit promoting Immer for immutable updates, the need for Immutable.js has reduced, making this library less relevant for new projects.
Developers must master both Redux and Immutable.js APIs, which can be daunting for teams unfamiliar with immutable data structures.