Stone.js API
    Preparing search index...
    • Decorator to create a snapshot of the current data.

      Type Parameters

      • T extends Function = Function

      Parameters

      • Optionalname: string

        The name of the snapshot.

      Returns MethodDecorator

      A method decorator.

      import { Service } from '@stone-js/core';
      import { Snapshot } from '@stone-js/use-react';

      @Service({ alias: 'userService' })
      class UserService {
      @Snapshot()
      showProfile() {
      return { name: 'John Doe' };
      }
      }