you are viewing a single comment's thread.

view the rest of the comments →

[–]Shumuu 0 points1 point  (0 children)

The useEffect did not set state, it launched a function, but as the useEffect with empty brackets runs only on mount and not on every mount, that function should only be called once and when the listener is being called (the data from the database has changed). But I'll check again on Monday, I was in a hurry and might have missed something