mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #188] New socket connected x30-200 times after receiving 4 items #89
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @meaningg on GitHub (Dec 12, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/188
When receiving data from a remote server made on acebase-server to the frontend made on acebase-client new sockets start constantly connecting and it comes up to two hundred in a couple of seconds

upd: This happens when the page is refreshed and blocks other actions with the database, such as adding new items
Code:
(Probably my mistake here somewhere, but I can't figure out where :))
@appy-one commented on GitHub (Dec 12, 2022):
I don't have any experience with React, but I reckon the db code is now triggered to run each redraw cycle
@meaningg commented on GitHub (Dec 12, 2022):
Yes, it did create a new connection for each rendering. I managed to fix it by throwing the initialization of the database and the initial list to useEffect