Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-immutable-to-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-immutable-to-js

A proxy creator for Redux store to convert immutable objects to JS objects.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Redux Immutable to JS

A proxy creator for Redux store to convert immutable objects to JS objects.

Motivation

Redux Immutable to JS allows you to convert immutable objects to JS objects automatically when Redux state is required outside reducers.

This library is inspired by Immutable Data Structures and JavaScript.

If you are using Immutable.js in a specific part of your system, don't make anything outside of it access the data structures directly. A good example is Redux and it's single atom app state. If the app state is an Immutable.js object, don't force React components to use Immutable.js' API directly.

Installation

npm install --save redux-immutable-to-js

Example App

$ cd example
$ npm install
$ npm start

Examples of Use

Simple

import { createStore } from 'redux';
import immutableToJS from 'redux-immutable-to-js';
import rootReducer from './reducers/index';

// create a store that has redux-immutable-to-js enabled
const finalCreateStore = immutableToJS()(createStore);

const store = finalCreateStore(rootReducer);

Composition

import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import immutableToJS from 'redux-immutable-to-js';
import rootReducer from './reducers/index';

// create a store that has redux-thunk middleware and redux-immutable-to-js enabled
const finalCreateStore = compose(
  applyMiddleware(thunk),
  immutableToJS()
)(createStore);

const store = finalCreateStore(rootReducer);

License

MIT

Keywords

FAQs

Package last updated on 23 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc