pull down to refresh

Ohh, nice fix! Also nice edit within the 10-minute timer, haha

112 sats \ 7 replies \ @optimism 2h

It was the ultimate pressure cooking exercise in javascript debugging because I wrote "verified works" and then I hit post and it died 😂

reply
101 sats \ 6 replies \ @ek OP 2h

Mhh, node.style = "visibility: hidden" leaves empty space behind.

But node.style = "display: none" should work! The node is still there for React without taking up any space in the DOM.

reply
101 sats \ 5 replies \ @optimism 2h

confirmed. This why you don't let old people code for the browser 😂

reply
101 sats \ 4 replies \ @ek OP 2h

With node.style = "display: none", you can also keep running it after the slightly faster DOMContentLoaded event and don't need requestAnimationFrame. The load event will also wait until images are loaded.

Thank you!!

reply
101 sats \ 3 replies \ @optimism 2h

Wait! Are you saying that my noob code reimplemented by you, and not the trillion dollar training of the 4 most expensive databases that have ever existed, fixed the bug?

Take that, silicon brains. lol

reply
101 sats \ 2 replies \ @ek OP 2h

You probably told it to run after hydration, and that’s what it did, haha

But when we don’t remove the node, we don’t interfere with hydration, so we don’t need to run it after hydration.

Edit: But sounded like it was still broken after the first prompt, so you prompted it again, and that contained the actual, inspiring fix via CSS haha

reply
101 sats \ 1 reply \ @optimism 2h

Nah I pasted the error, the script and the entirety of the react docs page on 2 concurrent arena.ai battles and said: fix the damn bug

(and all it did was introduce another bug)

reply
101 sats \ 0 replies \ @ek OP 2h

Ahh, ohh, well, then they deserve no mercy!