博文

目前显示的是 四月 30, 2025的博文

Scripting News v2: Wednesday, April 30, 2025

Wednesday, April 30, 2025 We could follow the clues in the TrumpLand with more gusto. They know their numbers are bad and likely to get worse, they did the things that made it the numbers bad. And at the same time they don't seem to care? If this were a mystery show, like Dallas or Succession or Severance, Lost perhaps, what would you think? # Here's a prototype of what a story page might look like on our baseline site for WordLand. I did this off on the side as input for the WordPress theme. I find it easier to work on style in a standalone page without much tech that can get in the way of fast iteration. # How blogs show their site title # We're working on the "baseline" theme for WordLand, the default -- the one that shows the user's writing in a WordPress context. I did a survey of news sites and blogs to see how they show their titles: # Gothamist puts the name in the upper left corner, leaving room for some b...

🔥 (215) Nuxt data fetching re-written: reactive keys, shared refs, and more

图片
Read this on my blog Just a few days ago Nuxt 3.17 dropped, and it comes with a massive data fetching improvement. So I've taken a bit of extra time with this one to give you some bonus tips based on these new features. You'll also get your regularly scheduled Vue tips, too. This one's got a lot in it, so enjoy! — Michael 🔥 Reactive Keys with useAsyncData You can make the keys in useAsyncData (and urls in useFetch ) reactive: // Getter (some function) const { data } = useAsyncData ( () => `key- ${ index + 1 } ` , () => $fetch ( 'https://some-url' ) ) // Ref const myRefKey = ref ( 'my-key' ) const { data } = useAsyncData ( myRefKey , () => $fetch ( 'https://some-url' )) // Computed const myComputedKey = computed (() => `my-key- ${ someOtherRef . value } ` ) const { data } = useAsyncData ( myComputedKey , () => $fetch ( 'https://some-url...