react-text-transition
react-text-transition copied to clipboard
Recalculate element width/height on window resize
Hi,
I believe this addresses #32 and fixes the element sizing when the window is resized.
To keep it performant, I've added the use-debounce
package, defaulted the debounce to 50ms
and added an option for users to configure the debounce if required.
Tested on my website and seems to have resolved the odd sizing when I played with the window size and the font changes size between different breakpoints.
Thanks 👍
Note that the yarn.lock
will need updating and feel free to make any tweaks/formatting changes too.
@WinterCore - would love to use your library but the issue regarding resizing behaviour may require us to use something else. Could you review this pull request?
Great job on this PR