update CircularText from official page demo - It is not ready but I need a green light #219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Screen.Recording.2025-05-23.at.11.30.54.PM.mov
After
Screen.Recording.2025-05-23.at.11.39.46.PM.mov