How to use the redux-bundler.createCacheBundle function in redux-bundler

To help you get started, we’ve selected a few redux-bundler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ipfs-shipyard / ipfs-webui / src / bundles / index.js View on Github external
import configBundle from './config'
import configSaveBundle from './config-save'
import navbarBundle from './navbar'
import toursBundle from './tours'
import notifyBundle from './notify'
import connectedBundle from './connected'
import retryInitBundle from './retry-init'
import identityBundle from './identity'
import bundleCache from '../lib/bundle-cache'
import ipfsDesktop from './ipfs-desktop'
import repoStats from './repo-stats'
import createAnalyticsBundle from './analytics'
import experimentsBundle from './experiments'

export default composeBundles(
  createCacheBundle({
    cacheFn: bundleCache.set
  }),
  appIdle({ idleTimeout: 5000 }),
  ipfsBundle({
    tryWindow: false,
    ipfsConnectionTest: async (ipfs) => {
      // ipfs connection is working if can we fetch the bw stats.
      // See: https://github.com/ipfs-shipyard/ipfs-webui/issues/835#issuecomment-466966884
      try {
        await ipfs.stats.bw()
      } catch (err) {
        if (!/bandwidth reporter disabled in config/.test(err)) {
          throw err
        }
      }
github HenrikJoreteg / redux-bundler-worker-example / src / bundles / index.js View on Github external
import { composeBundles, createCacheBundle } from 'redux-bundler'
import routes from './routes'
import baseData from './base-data'
import people from './people'
import viewport from './viewport'
import extraArgs from './extra-args'
import cache from '../utils/cache'

export default composeBundles(
  routes,
  baseData,
  people,
  viewport,
  createCacheBundle(cache.set),
  extraArgs
)
github HenrikJoreteg / redux-bundler-example / src / bundles / index.js View on Github external
import { composeBundles, createCacheBundle } from 'redux-bundler'
import routes from './routes'
import baseData from './base-data'
import people from './people'
import extraArgs from './extra-args'
import cache from '../utils/cache'

export default composeBundles(
  routes,
  baseData,
  people,
  createCacheBundle(cache.set),
  extraArgs
)
github dwarvesf / template-react-app / template / src / bundles / index.js View on Github external
import { composeBundles, createUrlBundle, createCacheBundle } from 'redux-bundler';

import routes from './routes';
import extraArgs from './extra-args';
import cache from '@/utils/cache';

export default composeBundles(
  createUrlBundle(),
  routes,
  createCacheBundle(cache.set),
  extraArgs,
);