Lurker News

Comments (124) 49 threads

Jyaif1 reply#
It would be better to set the data anyway, and let the code that shows the emojis determine whether to skip the emoji or not.

Continue this thread — 1 reply

jug#
OK, I guess that's technically understandable and all, but in this case I hope they understand their chart is completely and utterly unusable now.
joshxyz3 replies#
Ah the ReactJS emoji!

Continue this thread — 3 replies

AceJohnny21 reply#
What is the yellow smiley face that's twice as large as Japan but smaller than the earth and oh god I can see it in the sky it's look--
AceJohnny22 replies#
oh nm that's the moon
tim--1 reply#
Definitely had the same question, and the exact same realisation. We must be Android users!
AceJohnny21 reply#
I wrote the first comment before I realized what it was. I thought it was a joke where the author intentionally mis-sized an object.

Only after I submitted did it occur to me that the size could be similar to the moon's

Continue this thread — 1 reply

spiderice#
It's the moon from Majora's Mask, clearly
valleyer2 replies#
Neat concept.

As someone not very up-to-date in Web UI techniques, I was curious as to how the array was being advanced on scroll. Unfortunately, it looks like the answer is basically polling. The code constantly calls window.requestAnimationFrame(), checking window.pageYOffset. This means that the page is constantly doing work, even at idle.
Surely the more correct way is to install an onscroll handler or something, right?

vincentriemer1 reply#
The correct way would be a mix of those two strategies: an onscroll handler that schedules an update through requestAnimationFrame (ensuring that it only gets scheduled once until the next frame update actually executes).
goatherders2 replies#
The correct way is the way that works, which this does.
osrec1 reply#
Well, perhaps, but it's unnecessarily inefficient.

Continue this thread — 1 reply

framecowbird#
it barely works for me on mobile. very jittery
have_faith#
Request animation frame exists specifically to avoid ‘traditional’ polling. You’re thinking more of setInterval() which is the old way of doing it. The requestAnimationFrame docs are a good read, there are lots of performance benefits.

Load more comments