Skip to content

Commit

Permalink
fix: The onResize callback is no longer incorrectly called with the…
Browse files Browse the repository at this point in the history
… same values.

The same memoisation applied to the hook response's width and height
should've applied to the onResize callback as well, but it didn't.

This is now fixed, which means that even if the RO reports a change,
the onResize callback will only be called if there's an actual change
to report after the rounding function was applied to the reported values.
  • Loading branch information
ZeeCoder committed Aug 28, 2021
1 parent aa38199 commit bd0f3c8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,3 @@ The same technique can also be used to provide any of your preferred ResizeObser
## License

MIT

0 comments on commit bd0f3c8

Please sign in to comment.