I was experimenting with using gun
in a server side rendering (SSR) context and noticed that I began to receive duplicate items in the map
callback. The duplicate count was n, where n was the number of times I had refreshed the page.
I did some poking around and realised that I was spawning a gun
instance for every request to my server. So basically a new peer was being created for every request and therefore map
was returning a duplicate of each node for each peer
in the network.
Is this expected behaviour?