PresenceContext

The nearest AnimatePresence's registrar, which every Wardic element and ward under it registers its exit with. For building a presence-aware component of your own; an app needs usePresence or useIsPresent instead. Solid 1's: on Solid 2, a presence-aware component is built from wards, which hear their own leave.

import { usePresenceContext } from "@wardic/solid/v1"

const presence = usePresenceContext() // undefined outside one
  • usePresenceContext(): the nearest presence's registrar, undefined outside one.
  • PresenceContext: the Solid context itself, for providing one of your own.

Types

  • PresenceContextValue: what a presence publishes to the elements under it.
  • PresenceRecord: one child's registration: its live values and its exit, which the presence reads as it leaves.