🔥 (#156) 3 year anniversary (and announcement! 🎉)
Hey! I've got two things to share: First, it's been three years of these weekly newsletters. Thank you for reading! Honestly, I'm surprised I haven't missed a single week in that time — although it's been close a couple times. Second, today I'm happy to announce that Reusable Components is now available! You can check it out here (there's also a preview of the course). To celebrate this big update, it will be 35% off for the seven days. And just like I have for the last 3 years, here are your tips. — Michael 🔥 Fine-grained Loading API in NuxtIn Nuxt we can get detailed information on how our page is loading with the It's used internally by the But we have lots of control over how the loading indicator operates: We're able to specifically set the The difference between The 🔥 How to use callOnce in NuxtIf you need to run a piece of code only once, there's a Nuxt composable for that (since 3.9): Using It also has a key similar to By default Nuxt will use the file and line number to automatically generate a unique key, but this won't work in all cases. 🔥 Reactive SVG componentsSVGs can be reactive components, too. After all, they're HTML elements just like Here's an SVG component that has a prop to change it's fill colour: I'm sure you can build some pretty wild things if you dig into different SVG elements and attributes. Scoped slots and SVGs? Why not... Here's a demo if you want to see this example in action. 📜 Suspense: Everything You Need to KnowI wrote this article for VueSchool.io to clear up some misconceptions I've seen around Suspense. If you load data in your application, I think you'll find it useful. There are even some code demos so you can code along with the article! Check it out here: Suspense: Everything You Need to Know 💬 One way street"A good programmer is someone who always looks both ways before crossing a one-way street." — Doug Linder 🧠 Spaced-repetition: Nested Ref Properties in TemplatesThe best way to commit something to long-term memory is to periodically review it, gradually increasing the time between reviews 👨🔬 Actually remembering these tips is much more useful than just a quick distraction, so here's a tip from a couple weeks ago to jog your memory. One thing that's a little tedious with refs is when you need to access a nested property within the template: You can't just rely on auto-unwrapping of refs, you have to explicitly access the In this case, using a
|
评论
发表评论