WinterCore / react-text-transition

Animate your text changes
MIT License
601 stars 26 forks source link

Recalculate element width/height on window resize #68

Open South-Paw opened 1 year ago

South-Paw commented 1 year ago

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 👍

South-Paw commented 1 year ago

Note that the yarn.lock will need updating and feel free to make any tweaks/formatting changes too.

swijckmans commented 10 months ago

@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?

BRGustavoRibeiro commented 10 months ago

Great job on this PR