SyntaxUI / syntaxui

Get free access to pre-built, Tailwind CSS-powered components, animations and effects - brought to life using Framer Motion. Just copy, paste and you're ready to go!
https://syntaxui.com
MIT License
636 stars 45 forks source link

fix: removed key from BackgroundShift #112

Closed epoll31 closed 2 months ago

epoll31 commented 2 months ago

111

vercel[bot] commented 2 months ago

@epoll31 is attempting to deploy a commit to the SyntaxUI Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
syntax-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 7:58am
Ansub commented 2 months ago

I noticed you removed the key prop from the BackgroundShift component. But this prop helps React keep track of each instance of the component, especially when there are multiple ones being rendered.

Without it, React might get confused and not update things correctly, which could hurt performance.

Also props are still getting passed after the removal of key.

CleanShot 2024-04-30 at 14 09 42@2x

I made the fix here: a685831

epoll31 commented 2 months ago

In the issue I mentioned how React components don't need to explicitly add the key prop and that all react components can accept it. It's actually giving an error when adding it to the props list.