Episode 65: RFC the Vue: Script Setup with Lachlan Miller (RFCs 227 & 228)

Key Points From This Episode: Find out what script setup is and how it seeks to improve the developer experience. How this script setup RFC creates a more ergonomic way of authoring components without you having to learn anything new. Lachlan talks about the ref sugar RFC, which is more polarizing than script setup. Hear some of the panel’s mixed reactions to ref sugar, which reminds Alex of Svelte. Taking inspiration from other frameworks in the process of moving language forward. Defining props with the script setup RFC in a way that doesn’t change the amount of coding you would have to do anyway. Why coming to this RFC with a level of understanding and open-mindedness is critical. Why composition API is set up much closer to raw JavaScript. Lachlan speculates about how TypeScript and the ref sugar syntax might play out. How you could use Vue 3 to build plugin architecture like console logs or filters. The panel weighs in on how much magic is too much magic; why you should have a good reason for abstractions. Lachlan’s advice for those intrigued by script setup and ref sugar: try it before you buy it! Onto this week’s picks, which include Lachlan’s YouTube channel and Udemy courses, as well as My Octopus Teacher. Tweetables: “The idea is just to reduce the boilerplate because you're constantly writing export default, you're constantly writing return, and there's not a ton of value in constantly writing the same thing over and over again.” — @Lachlan19900 [0:02:55] “Vue traditionally was all about simplicity and ease to learn, so I think that's something that we all want to keep in Vue, both for developers and new users alike.” — @Lachlan19900 [0:06:36] “To ignore other innovations and other frameworks would be shortsighted. I think there's a lot of value in at least exploring these kinds of ideas..” — @Lachlan19900 [0:13:38] “This kind of ergonomic tooling can have downsides in that it's not exactly what you might be used to coming from another framework.” — @Lachlan19900 [0:20:30] “I don't think there can ever be too much magic, but there should be good reasons why you have abstractions. They should have the right thought process behind them.” — @Lachlan19900 [0:24:53] Links Mentioned in Today’s Episode: Lachlan Miller on Twitter Lachlan Miller on YouTube Lachlan Miller on GitHub Lachlan Miller on Udemy Lachlan Miller New in Vue 3: Watch & watchEffect with Alex Riviere RFC #227: New script setup (without ref sugar) RFC #228: Ref sugar sfc My Octopus Teacher, Netflix SoSplush, Kelly Mahoney Enjoy the Vue on Twitter Enjoy the Vue Special Guest: Lachlan Miller.Support Enjoy the Vue

Om Podcasten

Enjoy the Vue is a Vue.js podcast bringing you panel discussions, guest interviews, and much more to keep you up to date on what's happening in the Vue and tech communities.