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

useEffect with no dependency array #299

Open
amithmkini opened this issue Apr 2, 2024 · 1 comment
Open

useEffect with no dependency array #299

amithmkini opened this issue Apr 2, 2024 · 1 comment

Comments

@amithmkini
Copy link

Is there any reason why we need to set the id for every state update in the Chat component? I understand setting the id on component mount, but doesn't make sense to run it for every re-render.

useEffect(() => {
setNewChatId(id)
})

@athrael-soju
Copy link

That's a good find @amithmkini. I'd also like to see a response on this. But, there hasn't been much activity on this template from Vercel lately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants