4 ms·
I'll bring some demos of my snowflake animations and cartoon character gifs that follow the cursor around to the interview I actually quite like writing vanill
by asddubs 6y ago
I'll bring some demos of my snowflake animations and cartoon character gifs that follow the cursor around to the interview
I actually quite like writing vanilla js in my spare time, but I can never tell if I'm doing everything horribly wrong or not
- bob1029 6y agoAs long as it makes sense when you read it after a few days (i.e. its well organized) and it also works as expected, then you are probably doing well. Javascript is actually incredibly fast on most devices, especially if you are constraining yourself to the vanilla API and not something like jQuery. Remember, every web browser's JS engine has been hyper-optimized to support decades of half-assed website implementations. It's really hard to screw up perf on document.getElementById(). There's honestly not a whole lot of ways to hang yourself with the vanilla methods unless you are trying to build something ridiculous like a raytracer or physics engine.
- azangru 6y ago> document.getElementById() Can we at least do document.querySelector? Pretty please? :-)
- snet0 6y agoJust use the 1 line jQuery: const $ = document.querySelector.bind(document)
- abhishekjha 6y agoWhat does it do?
- asddubs 6y agoi think the biggest thing for your average app is just causing a lot of layout repaints. as long as you spam requestanimationframe everywhere and group style changes and polling, you'll be good. I was really surprised how good I was able to get things on even an ancient ipad 2 I had laying around