New to JavaScript — ES2022

New to JavaScript — ES2022

In this episode of Syntax, Scott and Wes talk about all the new stuff in ES2022 — what it is, why you might need it, and how to use it. Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Auth0 - Sponsor Auth0 is the easiest way for developers to add authentication and secure their applications. They provides features like user management, multi-factor authentication, and you can even enable users to login with device biometrics with something like their fingerprint. Not to mention, Auth0 has SDKs for your favorite frameworks like React, Next.js, and Node/Express. Make sure to sign up for a free account and give Auth0 a try with the link below: https://a0.to/syntax. Show Notes 04:50 - Regex indicies New d flag in a regex https://regex101.com/ This will tell you the indexes (indicies) of the regex matches Handy if you need to highlight or replaces matches in a string We can ask for the start and end positions of each matched capture group 07:16 - Class updates Private fields Properties and Methods to be kept private Prefix them with a # =Helpful for internal state and methods which should not be accessed directly or at all by external In React how we have __INTERNTAL_NEVER USE THIS class ColorButton extends HTMLElement { // All fields are public by default color = "red" // Private fields start with a #, can only be changed from inside the class #clicked = false } const button = new ColorButton() // Public fields can be accessed and changed by anyone button.color = "blue" // SyntaxError here console.log(button.#clicked) // Cannot be read from outside button.#clicked = true // Cannot be assigned a value from outside Getters and setters introduced in es5 https://www.w3schools.com/js/js_object_accessors.asp class Person { #hobbies = ['computers'] get #hobbiesGetter() { return this.#hobbies } #getHobbies() { return this.#hobbies } getHobbiesPublic() { return this.#hobbies } } const scott = new Person(); scott.#getHobbies(); // doesn't work scott.getHobbiesPublic(); // works 09:07 - Class fields This may seem super old because we have been polyfilling it forever Right now if you want an instance field on a class, you need to declare it in the constructor Now we can just declare them inside the class 10:36 - Static fields and methods As above can also be static with the static keyboard Works for methods too Explain what a static method is 13:17 - Top level await So handy in modules. Need to pull in some data? Simple. 15:19 - Ergonomic brand checks for private fields Used for checking if a private field on a class exists using the in keyword 16:00 - .at() method Strings and arrays - we can use square brackets to reference items of the array Super handy for grabbing the last item of an array // 🔥 New .at() method on arrays and strings const toppings = ['pepperoni', 'cheese', 'mushrooms']; // The old way to grab the last item toppings[toppings.length - 1]; // mushrooms // using .at() method with a negative index toppings.at(-1); // mushrooms // works with any index toppings.at(0); // pepperoni toppings.at(-2); // cheese // and with strings! 'Meeting Room: B'.at(-1) // B Why not use array[-1]? We used to use slice(-1) What about indexOf? 21:34 - Handy hasOwn method https://github.com/tc39/proposal-accessible-object-hasownproperty 24:51 - Class static block A static block allows you to run code before creating an optional static property during initialization https://github.com/tc39/proposal-class-static-block Links https://github.com/tc39/proposals/blob/master/finished-proposals.md ××× SIIIIICK ××× PIIIICKS ××× Scott: Ultraloq Smart Lock Wes: Magnatiles Shameless Plugs Scott: Web Components Course - Sign up for the year and save 25%! Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off! Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Episoder(969)

753: Cache Ruins Everything Around Me

753: Cache Ruins Everything Around Me

Scott and Wes dive into the cache problem, tackling user-specific data and caching security. From marketing A/B testing to content negotiation, they explore various challenges and solutions, including different URL/query parameters, edge logic, and client-side caching. Show Notes 00:00 Welcome to Syntax! 01:22 Syntax is on YouTube. 02:16 Let’s talk about the cache problem. 03:33 User-specific data and caching security. 06:27 Why might this pop up? 06:29 Marketing A/B testing - cookie based. 06:55 User-selected features - such as themes. 06:58 Language or geo-based items - accept language. 07:11 Images - WebP for some browsers, jpg for others. 07:45 JSON/HTML based on accept header. 08:17 Different encoding. 08:26 Content negotiation. 08:54 The solutions. 09:04 Provide different URLs/Query parameter. 11:19 Don’t cache the page, cache the data based on query. 15:01 Implement a “Cache Key” - one render for every option. Netlify Fastly Cloudflare 18:17 Use edge logic. 19:52 Just do it client-side. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

8 Apr 202424min

752: React vs Vue vs Angular with Corbin Crutchley

752: React vs Vue vs Angular with Corbin Crutchley

Which framework is best? Join Scott and Wes as they chat with Corbin Crutchley, author of the “Framework Field Guide”, diving into the world of frameworks, metaframeworks, and tips to stay up-to-date on the latest trends in web development. Show Notes 00:00 Welcome to Syntax! 00:48 Who is Corbin Crutchley? 02:08 Brought to you by Sentry.io. 02:32 Hilton, like the hotel? 05:57 What is the best framework? 07:23 How do you compare these frameworks? 10:00 Do you feel like the metaframeworks are comparable? 11:02 Exciting announcements from ng-conf? 11:42 Are Wiz and Angular merging? 14:17 Angular signals and Vue comparison. PreactJS Signals 17:53 Adding signals to vanilla JavaScript and browsers. 21:02 What is derived state? 23:11 How can we store state within these different frameworks? 24:37 Passing children. 26:40 Which has the best implementation for passing children? 28:52 What’s the approach for building framework agnostic components? TanStack Store 30:31 How much of it is framework specific? 31:35 Headless or DOM-based? 32:48 What are the best practices for writing this? 35:28 What’s the biggest framework pain point? 36:21 Is there a language that requires significantly more code? 38:52 What about Web Components? 39:58 Your book is free? Framework Field Guide Shout-out Eduardo Pratti and Kevin Aguilar. 42:42 What’s the process of writing a book like this? 45:44 Not a physical book? 46:17 Walk us through the tech stack. 48:27 Supper Club Questions. 48:33 What text editor, theme and font do you use? 49:53 What terminal and shell do you use? 50:19 How do you stay up to date? 53:39 Do you have advice for beginners? 55:26 Sick Picks + Shameless Plugs. Sick Picks Corbin: Shiki Syntax Highlighter Shameless Plugs Corbin: Framework Field Guide Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

5 Apr 202457min

751: UI Components: ShadCN, Tailwind UI, Headless, React Aria, Radix UI

751: UI Components: ShadCN, Tailwind UI, Headless, React Aria, Radix UI

Scott and Wes explore UI Components, discussing functionality, styling, accessibility, and theming. From headless components to styled starters, they share valuable insights to elevate your UI game. Show Notes 00:00 Welcome to Syntax! 02:39 We’re on YouTube. 03:14 The four categories of UI libraries or frameworks. 03:46 What does a UI component need to do? 04:14 Must be functional. 06:20 They must fit styling. 06:33 They must be accessible. 08:09 “Internationalizationable.” 09:29 They must handle theming and variants. 10:05 A few common UI components. 10:14 Date Pickers. 12:10 Dropdowns. 13:21 Toast message. Svelte French Toast 15:11 Some honorable mentions. 16:10 Headless components. 18:54 React Aria. Behavior, Accessibility, Internationalization 19:34 Radix UI Primitives. 20:16 Downshift JS. 21:29 Tanstack Table and Forms. 26:00 Unstyled components. 28:04 Shoelace. 32:47 React Aria Components. 33:00 Headless UI. 33:04 Radix UI. 37:12 Base UI. 38:23 What’s up with Google’s design? 40:22 Styled Starters. React Aria Components Starter ShadCN Tailwind Catalyst MeltUI 47:50 What is the process for overriding with custom elements. 51:10 UI Kits and Design Systems. 53:06 Some things to consider. JS Nation 55:41 A few more options to consider. Pigment CSS Base UI Shoelace BaseLayer JollyUI DraftUI Radix UI PenguinUI Tailwind CSS TailwindUI VerveUI DaisyUI ChakraUI Flowbite FloatingUI Downshift JS Mantine 59:02 Sick Picks & Shameless Plugs. Sick Picks Wes: Battery Daddy Scott: Lazy Susan, Rechargeable Batteries, Charger Shameless Plugs Scott: Syntax on YouTube Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

3 Apr 20241h 6min

750: New CSS and JavaScript You Should Be Using

750: New CSS and JavaScript You Should Be Using

Get stoked, jQuery 1.2 is here! Join Scott and Wes as they discuss jQuery Mobile, slicing PSD files, CSS rounded corners, CoffeeScript features, WordPress 2.3, and the rise of Skeuomorphism, shaping the landscape of web development this year. Show Notes 00:00 Welcome to Syntax! 01:16 Brought to you by Sentry.io. 02:17 jQuery 1.2 released! 07:38 jQuery Mobile. 09:34 Skeuomorphism. 10:25 How do you slice up your .PSDs? Slicy By MacRabbit 12:34 Cufon, new font method. 14:06 CSS rounded corners. CSS3Please 15:17 Coda Tip. 16:48 Top 5 CoffeeScript Features. 18:44 Conference Talks to Spotlight. BatmanJS, your new favorite JavaScript superhero 20:35 WordPress 2.3! 21:15 PHP 5.2.0 PHP 5.2.0 Release Announcement 21:53 Sponsored by Media Temple. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

1 Apr 202424min

749: Coding Shopify with Anne and Trudy of Design Packs

749: Coding Shopify with Anne and Trudy of Design Packs

Scott and Wes are joined by special guests Trudy MacNabb and Anne Thomas from Design Packs, diving into the nitty-gritty of Shopify design. Tune in as they dissect the pros and cons, challenges, and unveil their daily toolkit for crafting stunning Shopify websites. Show Notes 00:00 Welcome to Syntax! 00:59 Who is Anne Thomas? 02:30 Who is Trudy MacNabb? 04:06 Shopify themes, how does one build a theme? 05:34 Do you have enough control with LiquidJS? 07:52 Changing components of a liquid template. 08:58 LiquidJS improving their dev tools. 09:29 LiquidJS email marketing. 10:32 Can you make your own LiquidJS methods? Too Many Tabs 11:34 How would you create a theme from scratch using modern tools? 13:30 What about local dev and live reload? Shopify Tools CLI 15:17 Is Shopify improving? 17:13 What do you hate about Shopify themes? Shopify Tools Theme Kit 18:59 Have you used Hydrogen? Shopify Hydrogen 20:09 Headless has sacrifices. 22:02 Are people building full websites in Shopify? 23:56 Apps and integrations. 25:56 Are people creating businesses around these integrations? 29:16 What are design packs? 31:26 Do you run your own servers? 31:57 How does billing work with clients? 33:18 Apps being ‘Sherlocked’. ‘Sherlocking’ Explained 35:21 Where is the data stored? 36:35 Can you make a custom UI? 38:40 What are the downsides of building apps on Shopify? 39:17 Are you expected to maintain versions? 40:46 Do you manage all the support independently? 42:01 How do you match with their existing themes? 43:54 What are the most popular blocks? 45:17 Does Shopify provide bundlers or compilers? 46:47 Shopify moving to blocks. 47:38 Living as a digital nomad. Syntax Episode 586 on Nomad Developing 49:48 A new app Anne and Trudy launched. 51:35 Limited by block size. 54:08 Sick Picks + Shameless Plugs. Sick Picks Trudy: Bar of Shampoo Anne: Alie Ward Ologies Podcast Shameless Plugs Trudy: 25% off using SYNTAX25 at Design Packs Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

29 Mar 202458min

748: Fitness Will Make You a Better Developer

748: Fitness Will Make You a Better Developer

Level up your coding game -and your gains! Today, Scott and Wes weigh in on the importance of physical fitness for developers, covering motivation, diet, lifting basics, routines, and swole-inducing supplements. Show Notes 00:00 Welcome to Syntax! 01:14 Brought to you by Sentry.io. 03:10 A very quick disclaimer. 03:32 A brief view of our fitness history. 06:19 Why is fitness important for developers? 09:12 Setting your goals. 13:06 Getting started with fitness. 13:13 Body-weight. 13:58 Stretching. 16:47 Fun activities that don’t feel like workouts. 17:48 Lifting weights. Stronglifts StartingStrength 25:47 Home gym gear. Rogue Stall Bar 37:14 Fitness programs. 40:53 I guess we have to talk about diet. MacroFactorApp 46:37 Motivation. 47:42 Supplements. BulkSupplements.com Creatine 51:23 Sick Picks. Sick Picks Wes: Wikday Pull Up Bands Scott: Booty Bands Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

27 Mar 202455min

747: Middleware Explained

747: Middleware Explained

Join Wes and Scott for a hasty episode of Syntax as they unpack the power of middleware for developers, covering caching, authentication, A/B testing, error handling, and user redirection in a quick, punchy rundown to supercharge your backend skills! Show Notes 00:00 Welcome to Syntax! 00:41 Syntax on YouTube. 01:28 What is middleware? 05:04 Some real-world examples of middleware. 05:10 Authentication. 07:44 Redirecting users to a specific instance. 08:28 Logging + statistics. 09:41 Debugging. 10:00 Timers. 10:46 A/B testing. 11:59 Error handling + logging. 12:23 Caching. 13:02 Multi-tenant applications. 15:08 Where does it run? 18:07 What are the limitations? 21:52 Next.js middleware is one file only. NextJS Middleware 23:35 Sveltekit solution. Sveltekit Hooks 24:31 Connect style. Fastify Express Fastify Middle 25:28 One last thing, NPM Installing. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

25 Mar 202427min

746: Infrastructure for TS Devs: Kubernetes, WASM and Containers with David Flanagan

746: Infrastructure for TS Devs: Kubernetes, WASM and Containers with David Flanagan

Deploy your own tech stack: Wes and Scott are joined by Kubernetes expert David Flanagan to be schooled on how Kubernetes, Docker and even WASM containers work. Show Notes 00:00 Welcome to Syntax! 01:55 Should developers know how to run their own servers? 04:57 What is “bare metal”? 11:49 What the hell is Kubernetes? 12:25 Why would somebody need Kubernetes? 15:37 Using Kubernetes to spin up different instances on cloud providers. etcd 16:43 Kubernetes managing traffic spikes. 18:46 How much downtime can you handle? 22:11 What exactly is a container? 24:06 What containers do you prefer? Docker Containerd 25:28 Some additional terminology. OCI Open Container Initiative 26:43 What about WASM? WASM WebAssembly 29:31 Building a Docker container. 31:11 Why would someone want to use a WebAssembly container? 32:12 Are people shipping this technology? 33:36 What functions would you put in WASM? 36:57 How does someone make a WASM image? 39:22 A little more about Spin. Fermyon Spin 39:56 What type of processors are used in these servers? 42:27 What are home servers running on? Turing Pi 2 Daniel Mangum Universal Blue 46:40 How should someone get started with Kubernetes? Kubernetes.io Rawkode YouTube Kubesimplify Learnk8s 48:51 Infrastructure as code. CDK for Terraform GraalVM 55:19 Sick Picks & Shameless Plugs. Sick Picks David: Golem.cloud Restate.dev Shameless Plugs David: Rawkode YouTube Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott:X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

22 Mar 202459min

Populært innen Politikk og nyheter

giver-og-gjengen-vg
aftenpodden
aftenpodden-usa
forklart
popradet
stopp-verden
det-store-bildet
nokon-ma-ga
fotballpodden-2
dine-penger-pengeradet
lydartikler-fra-aftenposten
rss-gukild-johaug
hanna-de-heldige
bt-dokumentar-2
aftenbla-bla
frokostshowet-pa-p5
e24-podden
unitedno
rss-ness
oppdatert