How to use the store2.get function in store2

To help you get started, we’ve selected a few store2 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 ConanXie / new-tab / src / views / index / components / Header / Wallpaper / components / SaveImage.tsx View on Github external
private saveCurrentWallpaper = () => {
    const suffix = this.getSuffix(storage.get("image.type"))
    const filename = `mdnt-bg.${suffix}`
    chrome.downloads.download({
      url: this.props.url,
      filename,
    })
  }
  public render() {
github developmentseed / skynet-scrub / app / scripts / util / auto-save.js View on Github external
export function destroyLocalActions () {
  const stored = store.get(KEY);
  store.set(KEY, NULL);
  return stored === NULL ? false : stored;
}
export function saveLocalActions (actions) {
github dvalchanov / react-redux-2048 / src / scripts / reducers / Board.js View on Github external
function startSavedGame() {
  const game = store.get("game");

  if (game) {
    const tiles = _.flatten(game.grid, true);
    if (_.pluck(tiles, "id").length) id = _.max(ids) + 1;
    game.fromSaved = true;
    return fromJS(game);
  }
}
github ritz078 / transform / components / Layout.js View on Github external
componentDidMount() {
    Layout.loadCarbonAds();

    this.setState({
      checked: store.get("mode") === "dark"
    });

    window.addEventListener("beforeunload", this.alertExistHandler);
  }
github PacktPublishing / Hands-on-MERN-Stack-Web-Development / client / src / App.js View on Github external
() => {
        if (!document.hidden) {
          this.setState({
            itemsInCart: store.get('itemsInCart') || []
          });
          this.authUser();
        }
      }
    );
github vaibhavpandeyvpz / deapk / resources / js / components / AppComponent.vue View on Github external
mounted() {
            if (store2.has('apk')) {
                const data = store2.get('apk');
                this.checking = true;
                $.get('/api/browse', { id: data.id, path: '/' })
                    .always(() => this.checking = false)
                    .then(() => {
                        this.apk = data;
                        this.status = 'successful'
                    })
            }
        },
    }
github carrot2 / carrot2 / dcs / contexts / frontend / src / carrot2 / util / persistent-store.js View on Github external
export function persistentStore(key, defaults, methods) {
  const backingStore = store(Object.assign(defaults, storage.get(key), methods));

  observe(function () {
    storage.set(key, backingStore);
  });

  return backingStore;
}

store2

Better localStorage

MIT
Latest version published 9 months ago

Package Health Score

77 / 100
Full package analysis