Back to notes
The Tesseract MemoryTechnical note

Letting a reveal finish its job once

Fathom records first entry, disconnects the observer and leaves the section visible. CSS owns the motion that happens between those states.

Topics

Track entry, not animation progress

The useInView hook starts with a false boolean and observes the element attached to its ref. When the element crosses the configured threshold, the hook sets the boolean to true and disconnects the observer.

That state is not reset when the element leaves view. A reader scrolling upward therefore sees the section already present rather than starting its entrance again. The effect also disconnects during cleanup, covering a wrapper that leaves the page before its first entry.

Give CSS the transition between states

Reveal maps the boolean to an is-in class and accepts one of five typed delay options. CSS changes opacity and vertical position with those classes; React does not drive the intermediate frames.

The seabed-contour illustration uses the same entry hook at another threshold, then animates SVG strokes through CSS. The navigation's passive scroll listener is a separate behavior, so the one-time reveal design should not be described as removing all scroll listeners from the page.

Keep the fallback visible in the assessment

Reduced-motion rules set the reveal content to visible, remove its translation and disable the transition. The hook is still created, but readability in that mode does not wait for its visible class.

The normal reveal rule starts hidden, and the hook constructs IntersectionObserver without a support guard. Unsupported observers or failed JavaScript can therefore leave content hidden. That needs a visible-baseline or equivalent fallback and a browser check; neither was implemented or exercised in this read-only review.

Viewport reveal ownership

React observes a one-time entry; CSS selects the visual treatment.

Direct callAsync taskResponse / return
React component
Browser observation
CSS presentation

Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.

Choose a component to explore

Select a numbered component on the map or use the component menu. Its details and connections will appear here.

No component selected.

All connections (8)
  1. 01 · Reveal wrapper02 · Viewport hookattach ref · Direct call
  2. 02 · Viewport hook03 · IntersectionObserverobserve · Direct call
  3. 03 · IntersectionObserver05 · Visible classfirst intersection · Async task
  4. 03 · IntersectionObserver04 · Observer disconnectionentry observed · Direct call
  5. 02 · Viewport hook04 · Observer disconnectioneffect cleanup · Direct call
  6. 05 · Visible class01 · Reveal wrapperrender class · Response / return
  7. 01 · Reveal wrapper06 · Normal motion branchnormal preference · Direct call
  8. 01 · Reveal wrapper07 · Reduced-motion branchreduced-motion preference · Direct call