How to use the @rematch/core.dispatch.screenshot function in @rematch/core

To help you get started, we’ve selected a few @rematch/core 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 EvanBacon / Expo-Nitro-Roll / rematch / models.js View on Github external
updateAsync: async ({ ref }) => {
      const { width, height } = Dimensions.get('window');
      const options = {
        format: 'png',
        quality: 0.3,
        result: 'file',
        height,
        width,
      };
      const uri = await Expo.takeSnapshotAsync(ref, options);
      dispatch.screenshot.update(uri);
    },
  },
github EvanBacon / Expo-Pillar-Valley / client / src / rematch / models.js View on Github external
updateAsync: async ({ ref }) => {
      const { width, height } = Dimensions.get('window');
      const options = {
        format: 'jpg',
        quality: 0.3,
        result: 'file',
        height,
        width,
      };
      const uri = await takeSnapshotAsync(ref, options);
      dispatch.screenshot.update(uri);
    },
  },
github EvanBacon / Expo-Pillar-Valley / client / src / Game / Game.js View on Github external
takeScreenshot = async () => {
    if (this.screenShotTaken || !Settings.isScreenshotEnabled) {
      return;
    }
    this.screenShotTaken = true;

    await dispatch.screenshot.updateAsync({
      ref: global.gameRef,
      width: this._width,
      height: this._height,
    });
  };
github EvanBacon / Expo-Nitro-Roll / Game / Game.js View on Github external
takeScreenshot = async () => {
    if (this.screenShotTaken) {
      return;
    }
    this.screenShotTaken = true;

    await dispatch.screenshot.updateAsync({
      ref: global.gameRef,
      width: this._width,
      height: this._height,
    });
  };