Skip to content

Conversation

mnprtstle
Copy link

apihub/examples/apps/chat-app/web/react-vite-tailwind/src/pages/chat.tsx (line 412): removed chats dependency from useEffect as it is actually not being used in any of the socket handlers, we are using updater function which is going to use the latest value of the chat, also having the chat as a dependecy also means that we will create and remove socket subscriptions every time the chats changes e.g. on receiving or sending new messages.

apihub/examples/apps/chat-app/web/react-vite-tailwind/src/pages/chat.tsx (line 360): removed a socket emit execution as it was already being called in getMessages function called next, the payload was also incorrect, resulting in the payload being undefined upon checking on the server

@wajeshubham
Copy link
Collaborator

@mnprtstle We do not accept PRs for examples submitted by others. We only accept PRs contributing to the core freeapi modules or new examples from scratch

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

Successfully merging this pull request may close these issues.

2 participants