Decorator to create a snapshot of the current data.
Optional
The name of the snapshot.
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' }; }} Copy
import { Service } from '@stone-js/core';import { Snapshot } from '@stone-js/use-react';@Service({ alias: 'userService' })class UserService { @Snapshot() showProfile() { return { name: 'John Doe' }; }}
Decorator to create a snapshot of the current data.