You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 5, 2026. It is now read-only.
[bpk-component-infinite-scroll] Migrate to TypeScript #4744
bpk-component-infinite-scroll is a pure-JS package with 4 source files. This package has a class-based HOC (withInfiniteScroll) that is also affected by the React 19 defaultProps migration.
Files to migrate (4)
File
Type
src/withInfiniteScroll.js
Class-based HOC — uses prop-types and defaultProps
src/DataSource.js
Data source utility
src/intersection-observer.js
Intersection observer wrapper
src/withInfiniteScroll-test.flow.js
Flow type test file — remove or convert
Migration guidance
Rename all .js → .tsx (components) or .ts (utilities).
Replace prop-types imports with TypeScript interfaces/types.
Migrate withInfiniteScroll class component — convert static defaultProps to destructure defaults or convert to a functional component with hooks. This is also tracked in the React 19 migration (REACT_19_MIGRATION.md).
Remove withInfiniteScroll-test.flow.js — Flow is no longer used in Backpack; convert any useful type assertions to TS.
Update test files and Storybook stories to .tsx.
Update index.js → index.ts and package entry points.
Runnpm run lint, npm run typecheck, and npm test.
⚠️ React 19 interaction
The withInfiniteScroll HOC has defaultProps on a class component. Under React 19, class defaultProps still work but are deprecated for function components. A recent fix (#4689) corrected a bug where initiallyLoadedElements was used instead of elementsPerScroll — ensure the TS migration preserves this fix.
Triaged as enhancement / ready-for-human. The mechanical TS rename is agent-ready, but withInfiniteScroll is a class-based HOC with defaultProps that intersects the React 19 migration (REACT_19_MIGRATION.md). The decision of whether to do a minimal class-component TS migration or take the opportunity to convert to a functional component with hooks requires human judgment before an agent picks this up.
Activity
gert-janvercauteren commentedon Jul 3, 2026
Triaged as enhancement / ready-for-human. The mechanical TS rename is agent-ready, but
withInfiniteScrollis a class-based HOC withdefaultPropsthat intersects the React 19 migration (REACT_19_MIGRATION.md). The decision of whether to do a minimal class-component TS migration or take the opportunity to convert to a functional component with hooks requires human judgment before an agent picks this up.[bpk-component-infinite-scroll] Migrate to TypeScript (#4757)