Skip to content

fix: observe fallbackInView option updates in InView - #788

Open
feritcemkahraman wants to merge 1 commit into
thebuilder:mainfrom
feritcemkahraman:fix-inview-fallback-option-updates
Open

feritcemkahraman wants to merge 1 commit into
thebuilder:mainfrom
feritcemkahraman:fix-inview-fallback-option-updates

Conversation

@feritcemkahraman

@feritcemkahraman feritcemkahraman commented Oct 10, 2026 •

Copy link
Copy Markdown

When IntersectionObserver is unavailable, changing <InView fallbackInView> from true to false leaves the rendered visibility and callback at the old value. The class component's observer-option comparison does not include this prop.

Include fallbackInView alongside the other observer options. The browser regression rerenders the same component and verifies both rendered state and onChange. It fails before the fix.

Validation:

  • All 99 tests in 7 files pass (real Chromium browser project plus Node SSR project). A temporary local config points Playwright to the installed Chromium; committed config unchanged.
  • TypeScript noEmit passes.
  • Package-wide Biome lint and changed-file Biome check pass. Full formatting check reports existing Windows checkout CRLF differences in other files; those are not included in this fix.
  • tsup builds CJS, ESM, declarations, and test-utils; the existing dist/esm compatibility copy was reproduced with native Windows commands.
  • All four size-limit checks pass: InView 1.37 kB, useInView 1.35 kB, useOnInView 1.11 kB, observe 778 B.
  • git diff --check passes.

The Storybook/docs app builds and packed compatibility matrix were not run for this class-component option fix.

Additional validation completed after opening: publint reports no errors (only an engines.node suggestion), and the packed @arethetypeswrong/cli --pack check reports no problems for both exports across node10, node16 CJS/ESM, and bundler modes.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-intersection-observer Ready Ready Preview Oct 10, 2026 6:10pm UTC

@vercel

vercel Bot commented Oct 10, 2026

Copy link
Copy Markdown

@feritcemkahraman is attempting to deploy a commit to the Daniel Schmidt's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch was successfully deployed

1 active deployment
Preview – react-intersection-observer — 923cb1da Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant