hooks icon indicating copy to clipboard operation
hooks copied to clipboard

refactor: remove intersection-observer polyfill

Open Sultan-Q opened this issue 1 month ago • 1 comments

The intersection-observer polyfill is no longer needed as the Intersection Observer API has been supported by all major browsers since 2019 (Baseline). This change removes the polyfill dependency and its import.

Changes:

  • Removed intersection-observer from packages/hooks/package.json dependencies.
  • Removed import 'intersection-observer' from packages/hooks/src/useInViewport/index.ts

[中文版模板 / Chinese template]

🤔 This is a ...

  • [ ] New feature
  • [X] Bug fix
  • [ ] Site / documentation update
  • [ ] Demo update
  • [ ] TypeScript definition update
  • [X] Bundle size optimization
  • [ ] Performance optimization
  • [ ] Enhancement feature
  • [ ] Internationalization
  • [X] Refactoring
  • [ ] Code style optimization
  • [ ] Test Case
  • [ ] Branch merge
  • [ ] Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • [X] Doc is updated/provided or not needed
  • [X] Demo is updated/provided or not needed
  • [X] TypeScript definition is updated/provided or not needed
  • [X] Changelog is provided or not needed

Sultan-Q avatar Dec 04 '25 10:12 Sultan-Q

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 04 '25 10:12 CLAassistant