Skip to content

v1.3.0

Choose a tag to compare

@joshxfi joshxfi released this 23 Sep 01:56
· 35 commits to main since this release
1be11fe

Performance Improvements 🚀

  • Memoized Components: Both the main HighlightPopover component and the new PopoverContent component are now memoized using React.memo(), significantly reducing unnecessary re-renders.

  • Optimized Event Handling: The selectionchange event listener now uses requestAnimationFrame to batch updates, reducing the frequency of calculations and improving overall performance.

  • Reduced State Updates: The handleSelection function now checks conditions before updating state, minimizing unnecessary renders.

  • Memoized Context Value: The contextValue is 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 useHighlightPopover hook, 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@latest

Full Changelog: v1.2.0...v1.3.0