react-bits icon indicating copy to clipboard operation
react-bits copied to clipboard

update CircularText from official page demo - It is not ready but I need a green light

Open PedroMarianoAlmeida opened this issue 6 months ago • 1 comments

Refactor for Performance Improvement

I refactored the component to improve performance by replacing useState with Framer Motion’s useMotionValue hook. This avoids unnecessary re-renders by preventing state updates on every frame.

If you find this approach effective, I’d be happy to apply the same optimization to the other CircularText components as well (I did the change on the Component that runs on the page, so if you run this branch and navigate to http://localhost:5173/text-animations/circular-text, it is possible to see the difference)

Before:

https://github.com/user-attachments/assets/04e1b0a7-623b-48dd-8b6c-4cf7522d67c8

After

https://github.com/user-attachments/assets/bc50aaff-54de-41ed-9c93-eb560d2beccb

PedroMarianoAlmeida avatar May 24 '25 02:05 PedroMarianoAlmeida

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
react-bits-ui ⬜️ Ignored (Inspect) Visit Preview May 24, 2025 2:50am

vercel[bot] avatar May 24 '25 02:05 vercel[bot]

Thanks for pointing it out, wasn't able to review on time but I quickly fixed it and and did some other minor tweaks to move things along faster, will close this one

DavidHDev avatar Jun 09 '25 16:06 DavidHDev