Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇

272 B
Raw Blame
// ©AngelaMos | 2026
// heartbeat.ts

import { create } from 'zustand'

interface HeartbeatStore {
  lastTs: number | null
  beat: () => void
}

export const useHeartbeat = create<HeartbeatStore>((set) => ({
  lastTs: null,
  beat: () => set({ lastTs: Date.now() }),
}))