Skip to content

V4.2.0 - The `<Foresight>` Component

Latest

Choose a tag to compare

@spaansba spaansba released this 13 Jun 20:25
· 2 commits to main since this release
8b65e23

v4.2 reworks the React and Vue packages around a single declarative <Foresight> component. Registering a list of elements no longer means wiring up useForesights and juggling callback refs. You wrap your items in <Foresight> and you're done. Under the hood the core also got a round of dedup and cleanup: duplicated settings/registration/logging paths are gone, and data-attribute mirroring is now a single global manager setting instead of a per-element concern.

js.foresight v4.2.0

  • New: dataAttributeMirroring global setting. Mirroring registration data to element data-* attributes is now controlled once on the manager instead of per element (#133).
  • Changed: active/parked element counts are now derived from state rather than tracked separately, removing a class of drift bugs (#134).
  • Fix: changing the touch strategy to its current value no longer triggers a no-op settings change (#125).
  • Fix: the desktop handler now respects positionHistorySize on init (#124).
  • Performance: only active elements are observed on handler connect; parked elements stay out of the observer until reactivated (#126).
  • Internal: removed duplicated settings/registration/logging code paths (#129) and dropped the unused HasListenersFunction type export (#127).

js.foresight-devtools v2.2.0

  • Updated for the core changes above; element data-attribute display follows the new global dataAttributeMirroring setting (#133).

@foresightjs/react v0.3.0

  • New: <Foresight> component replaces useForesights for registering dynamic lists of elements declaratively (#131).
  • Fix: useForesight now handles multiple refs correctly (#135).

@foresightjs/vue v0.3.0

  • New: <Foresight> component replaces useForesights for registering dynamic lists of elements declaratively (#132).
  • Fix: useForesight now handles multiple refs correctly (#135).

Full Changelog: V4.1.0...V4.2.0