Giter Site home page Giter Site logo

gleydson / redux-immutable-persistence-transform Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 37 KB

:volcano: Library that allows you to transform immutable data created with seamless-immutable for use with redux-persist

Home Page: https://www.npmjs.com/package/redux-immutable-persistence-transform

License: MIT License

JavaScript 100.00%
seamless-immutable redux-persist redux-persist-transform ramda react react-native

redux-immutable-persistence-transform's Introduction

npm version npm

Redux Immutable Persistence Transform

Library that allows you to transform immutable data created with seamless-immutable for use with redux-persist

Why?

As of version 5 of redux-persist, the use of immutable states is no longer supported. In this way it is necessary to use a transformer that will carry out the conversion of its state to immutable data as necessary

Installation

yarn add redux-immutable-persistence-transform

or

npm i redux-immutable-persistence-transform

How to use?

import { createStore } from "redux";
import { persistStore, persistReducer } from "redux-persist";
import AsyncStorage from "@react-native-community/async-storage";
import SeamlessImmutablePersistenceTransform from "redux-immutable-persistence-transform";

import reducers from "./ducks";

const persistConfig = {
  key: "root",
  storage: AsyncStorage,
  transforms: [SeamlessImmutablePersistenceTransform]
};

const persistedReducer = persistReducer(persistConfig, reducers);

const store = createStore(persistedReducer);
const persistor = persistStore(store);

export { store, persistor };

License

Distributed under the MIT license. See LICENSE for more information.

Contact

Gleydson Rodrigues - Github - [email protected]

redux-immutable-persistence-transform's People

Contributors

gleydson avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.