Skip to content

Suggestion: Use a single global readable store for live updates #29

@matthewrobb

Description

@matthewrobb

Somewhat like this:

import { readable } from "svelte/store"

const NOW = readable(new Date(), (set) => {
  const timer = setInterval(() => set(new Date()), 1000)
  return () => clearInterval(timer)
})

Effectively eliminating the NEED for configurable granularity (could still support special cases) while reducing the number of timers required for like a large list of things to 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions