Gathering detailed insights and metrics for @randy.tarampi/redux-offline-immutable-config
Gathering detailed insights and metrics for @randy.tarampi/redux-offline-immutable-config
Gathering detailed insights and metrics for @randy.tarampi/redux-offline-immutable-config
Gathering detailed insights and metrics for @randy.tarampi/redux-offline-immutable-config
Provide a configuration for redux-offline to use an immutable root state with redux-persist-immutable
npm install @randy.tarampi/redux-offline-immutable-config
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
3 Commits
1 Forks
2 Watchers
2 Branches
2 Contributors
Updated on Jan 06, 2022
Latest Version
1.0.1-1
Package Id
@randy.tarampi/redux-offline-immutable-config@1.0.1-1
Unpacked Size
8.82 kB
Size
3.60 kB
File Count
15
NPM Version
6.7.0
Node Version
8.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
1
Provide a configuration for redux-offline
to use an immutable root state
with redux-persist-immutable
npm install redux-offline-immutable-config
# or
yarn add redux-offline-immutable-config
Follow redux-offline
base setup instruction at redux-offline
, then apply the following changes.
1import { applyMiddleware, createStore, compose } from 'redux'; 2import { offline } from 'redux-offline'; 3import defaultConfig from 'redux-offline/lib/defaults'; 4 5// replacing redux-offline defaults with immutable* counterparts 6import { persist, persistAutoRehydrate, offlineStateLens } from 'redux-offline-immutable-config'; 7 8// ... 9 10// example of redux-persist configuration 11// see https://github.com/rt2zz/redux-persist#persiststorestore-config-callback 12const persistOptions = {}; 13const persistCallback = () => { 14 console.log('rehydration completed') 15}; 16 17const offlineConfig = { 18 ...defaultConfig, 19 persist, 20 persistAutoRehydrate, 21 persistOptions, 22 persistCallback, 23 offlineStateLens 24}; 25 26const preloadedState = fromJS({}); // this is the immutable root state 27const store = createStore( 28 reducer, // your main reducer 29 preloadedState, 30 compose( 31 applyMiddleware(middleware), // your middleware 32 offline(offlineConfig) 33 ) 34);
1import { persist, persistAutoRehydrate, offlineStateLens } from 'redux-offline-immutable-config'; 2 3const autoRehydrateOptions = __DEV__ === true 4 ? {log: true} 5 : {}; 6 7const offlineConfig = { 8 ...defaultConfig, 9 persist, 10 persistAutoRehydrate: () => persistAutoRehydrate(autoRehydrateOptions), 11 persistOptions, 12 persistCallback, 13 offlineStateLens 14}; 15 16// ... 17
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More