You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Following the Connect to AWS AppSyncEvents docs example in a vite react app causes duplicate events to arrive for every sent event when running under npm run dev.
This is because the useEffect is run twice in dev mode and the channel.close is running (maybe before the subscription is fully formed).
To Reproduce
Pull down this sample app, run sandbox and launch npm run dev.
Setup a user
Click "Publish Event" to see the events experience with duplicates
Click "Publish Todo" to see the data create subscription without duplicates
See the browser console for id specific events noting the opening/closing of different subscriptions
Expected behavior
I would expect channel subscriptions for events to not present duplicates in the same way that the data subscriptions doesn't duplicate events.
Screenshots
Desktop (please complete the following information):
OS: OS X 15.3.1 (24D70)
Browser Chrome
Version 133.0.6943.127
The text was updated successfully, but these errors were encountered:
Describe the bug
Following the Connect to AWS AppSyncEvents docs example in a vite react app causes duplicate events to arrive for every sent event when running under
npm run dev
.This is because the
useEffect
is run twice in dev mode and thechannel.close
is running (maybe before the subscription is fully formed).To Reproduce
npm run dev
.Expected behavior
I would expect channel subscriptions for events to not present duplicates in the same way that the data subscriptions doesn't duplicate events.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: