Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed key from BackgroundShift #112

Closed
wants to merge 1 commit into from

Conversation

epoll31
Copy link
Contributor

@epoll31 epoll31 commented Apr 30, 2024

Copy link

vercel bot commented Apr 30, 2024

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

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Apr 30, 2024

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
Copy link
Member

Ansub commented Apr 30, 2024

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

@Ansub Ansub closed this Apr 30, 2024
@epoll31
Copy link
Contributor Author

epoll31 commented Apr 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants