Animated Sparkles in React — react, animation
⚠️ Please no sharing — This is a newsletter-exclusive preview ⚠️
Josh Comeau |
Hi there!
My blog is set up so that each blog post is a dive into some non-trivial thing. I've been itching to release smaller pieces of content; some of the most helpful things I know are short and sweet!
I've been experimenting with snippets. The idea with snippets is that they highlight a straightforward solution to a common problem, and present the code in an easy-to-copy-paste way.
So far, I've published 10 snippets, and they cover a lot of ground. Here are some of my favourites:
setInterval
, except not uniform. You give it a min/max time, and every iteration has slightly different timing.range
function, to generate a list of numbers in JavaScriptBecause these are so much quicker to produce than blog posts, I expect this list to grow quickly. You can view a complete list, and I'll be improving the browsing experience as time passes.
I've been hard at work on what has been one of the most challenging posts to write. It explores a fun "sparkle" effect I've been using on my blog to add positive emphasis to things.
This post covers all of the foundational pieces required to add your own customizable <Sparkle>
component to your site/app!
⚠️ Please no sharing — This is a newsletter-exclusive preview ⚠️
I recently got approved on Github Sponsors! If you want to, you can sponsor my work (Update: I've discontinued my Github sponsorship, since this blog and newsletter is now profitable!).
It's a weird time to be asking for money; in truth, I'm pretty financially secure, and I know many other folks are in worse situations than I am. That said, my costs have risen quite a bit; it costs me about \$200-250 USD a month to keep my various site-projects running (half a terabyte of monthly bandwidth, newsletter fees, serverless functions, legacy servers, domains…)
Happily, I am in a position of privilege and I can cover these costs without having to make any sacrifices. Please don't feel any pressure to contribute, especially if your own situation doesn't feel secure.
Hope you're staying safe and staying home ✌🏻