Sun on Nostr: I spent hours trying to get something working in ReactJS, did some Internet searching ...
I spent hours trying to get something working in ReactJS, did some Internet searching and found out everybody has this problem. Problem being, using a websocket to feed a component data. When you're running in dev mode, React intentionally renders every component twice just to punish you.
Published at
2025-01-14 05:24:59Event JSON
{
"id": "34c056330d1c7df7bac560e42012f6e366d90484a04fe8d5bba983c493a23e01",
"pubkey": "05de5f2d3b8d98f9b929695080ae6aa51b14f00dc122eef1d40d502a0ab48154",
"created_at": 1736832299,
"kind": 1,
"tags": [
[
"zap",
"05de5f2d3b8d98f9b929695080ae6aa51b14f00dc122eef1d40d502a0ab48154",
"wss://relay.mostr.pub",
"0.915"
],
[
"zap",
"6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9",
"wss://relay.mostr.pub",
"0.085"
],
[
"proxy",
"https://shitposter.world/objects/46c39c40-5085-44f5-9057-f185624ecc41",
"activitypub"
]
],
"content": "I spent hours trying to get something working in ReactJS, did some Internet searching and found out everybody has this problem. Problem being, using a websocket to feed a component data. When you're running in dev mode, React intentionally renders every component twice just to punish you.",
"sig": "b3beca90e29a7da23fe2b8a9f3725a0a1710a1e4ad4b1456fe593ed4c6ff504edb19d27fddf1eae69215f8ff73f5117e59edf58c4a77b07c88726ae00930f837"
}