Repository navigation
v1.3.0
Performance Improvements 🚀
-
Memoized Components: Both the main
HighlightPopovercomponent and the newPopoverContentcomponent are now memoized usingReact.memo(), significantly reducing unnecessary re-renders. -
Optimized Event Handling: The
selectionchangeevent listener now usesrequestAnimationFrameto batch updates, reducing the frequency of calculations and improving overall performance. -
Reduced State Updates: The
handleSelectionfunction now checks conditions before updating state, minimizing unnecessary renders. -
Memoized Context Value: The
contextValueis now memoized to prevent unnecessary re-renders of context consumers.
Documentation 📚
- Updated Basic Example: The basic usage example in the documentation now demonstrates the use of the
useHighlightPopoverhook, providing a more comprehensive illustration of the component's capabilities.
Upgrade Instructions
To upgrade to v1.3.0, run:
npm install @omsimos/react-highlight-popover@latestFull Changelog: v1.2.0...v1.3.0