React + TypeScript

React + TypeScript

In this episode of Syntax, Scott and Wes talk about using React with Typescript — how to set it up, components, state, props, passing data, custom hooks, and more! Freshbooks - Sponsor Get a 30 day free trial of Freshbooks at freshbooks.com/syntax and put SYNTAX in the “How did you hear about us?” section. Sentry - Sponsor If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up. Linode - Sponsor Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started. Show Notes 04:55 - Components Strategies Example: type Props = { value: string; } const App = (props: Props) => Return type? JSX.Element FC or FunctionComponent It’s discouraged for this reason: It means that all components accept children, even if they're not supposed to It could be useful for a return type 12:13 - Props Default props: const defaultJoke: JokeProps = { joke: 'LOL JOE', id: 'YEAH', status: 200, }; function JokeItem({ joke = defaultJoke }: JokeProps): JSX.Element { return ( {joke.joke} = {joke.id} ); } Because props are always destructured, you often have to make a new type for your props. You can’t just type each argument by itself. 18:38 - State Just like Generics, State can be inferred If your type is simple and you’re using useState, it just works: const [user, setUser] = useState(null); 22:27 - useEffect Nothing special required Good use of void: If you want to use a Promise function but not worry about await or .then(), you can pop a void in front of it: useEffect(() => { console.log('Mounted'); // getJoke().then(console.log).catch(console.error); void getJoke(); }, [getJoke]); 26:09 - Refs Very similar to state however some interesting things with null: const ref1 = useRef(null!); “Instantiating the ref with a current value of null but lying to TypeScript that it’s not null.” 29:33 - Custom Hooks This is a great use case for Tuples 31:00 - Context This is probably the most complex thing in this list First define the types Use generic to pass in types OR null This can also be non-null if you have default values in createContext: const AppCtx = React.createContext(null); 35:21 - Events The React events system is better than Vanilla JS Can handle them inline and have it inferred: onClick={e ⇒ yeah(e.target)} const onSetType = (e: React.ChangeEvent) => setType(e.target.value) React has a bunch of events built in — many of them take a Generic argument so you can specify the type of element that triggered it. Handy for native API methods like play and pause. 39:27 - ForwardRef Again use of to pass in forwarded ref type as param 1, Props types as param 2: type Props = { children: React.ReactNode; type: "submit" | "button" }; export type Ref = HTMLButtonElement; export const FancyButton = React.forwardRef((props, ref) => ( {props.children} )); 41:30 - ESLint Typescript-react is good Extend your own Most JS rules apply to TS 46:20 - React as Global React 17 Also add JSX: True to eslint globals for typing things like JSX.Element global.d.ts import * as react from "react" import * as react_dom from "react-dom" declare global { type React = typeof react type ReactDOM = typeof react_dom } 48:08 - TSConfig jsx: "react" React emit .js files with JSX changed Preserve .jsx file output React-native → .js files with jsx not changed 53:05 - Frameworks? Next.js makes this a TREAT Gatsby just use .tsx extensions https://www.gatsbyjs.com/plugins/gatsby-plugin-ts-config/ Links https://github.com/typescript-cheatsheets/react Tanner Linsley https://github.com/wesbos/eslint-config-wesbos Deno Architect https://fav.farm/ Snowpack Vite Parcel 2 Foam ××× SIIIIICK ××× PIIIICKS ××× Scott: Obsidian Wes: Folding Allen Keys Shameless Plugs Scott: 1: Level Up Tutorials Pro Spring Sale - 50% off annual subscriptions! 2: SvelteKit Course Wes: Beginner Javascript Course - 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(967)

967: What’s Going to Happen in Web Dev During 2026

967: What’s Going to Happen in Web Dev During 2026

Wes and Scott talk about their bold predictions for web development in 2026, from WebGPU-powered design and modern CSS breakthroughs to JavaScript standards, AI-driven tooling, security risks, the future of frameworks, workflows, and more! Show Notes 00:00 Welcome to Syntax! 00:49 WebGPU and 3D experiences will finally take off Lando Norris 01:30 Web design will make a comeback Raycast shaders.com 04:03 Light mode returns (yes, really) 07:06 Modern CSS standards are about to have a huge year CSS Wrapped Graffiti 13:15 Will the Temporal API finally ship everywhere in 2026? 14:18 The rise of the standard stack 16:18 Are we headed toward standardized RPC? 19:41 What’s next (and what’s not) for React 21:07 Why we’ll see more security failures in web dev 22:35 SvelteKit 3 lands in 2026 22:53 Where developer tooling is headed next Oxc Biome 26:44 More big acquisitions Anthropic Bun 28:02 2026: the year of durable compute 30:57 Frameworks will matter less as AI gets better 33:34 End-to-end AI workflows become the norm 36:04 Brought to you by Sentry.io 37:21 Personalized software for everyday people 39:11 MCP and MCP UI will pop 42:24 Developer skills will fall off 46:20 Crappy software will continue 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

31 Des 202548min

966: A Look Back at Web Dev in 2025

966: A Look Back at Web Dev in 2025

Wes and Scott revisit their 2025 web development predictions, grading hits and misses across AI, browsers, frameworks, CSS, and tooling. From Temporal and AI coding agents to React, Vite, and vanilla CSS, they reflect on what actually changed, what stalled, and what it all means heading into 2026. Show Notes 00:00 Welcome to Syntax! 866: 2025 Web Development Predictions 01:26 Temporal API will ship in the browser 03:33 On-device AI becomes common 06:14 WebGPU unlocks fast local machine learning TypeGPU 07:10 Models will plateau 10:32 Is there an actual use case for video and photo gen AI? 13:27 Text to UI tools get really good 16:25 Framework choice will matter less 18:53 Web components in Standard Stack, Web Awesome takes off 21:37 AI browsers and Copilot Workspace-style tools will become normal 22:56 AI browsera will become inevitable, OpenAI will launch a browser 27:51 Relative color will feel fully “safe to use” 29:02 Vanilla CSS will make a comeback 30:33 Brought to you by Sentry.io 30:58 CSS mixins and functions spec solidifies CSS Custom Functions and Mixins Module Level 1 33:25 Container style queries will ship everywhere CSS if statements 35:40 Vertical centering jokes will stubbornly persist 36:20 VS Code will reach feature parity with Cursor 38:47 More VS Code forks will appear 39:46 React Compiler drops Babel 40:34 React server components will pop 42:17 Remix re-emerges as something new 43:17 React Native will have its time 44:21 TanStack Start and Tanstack will pop 45:46 SvelteKit gets more granular data loading 46:06 Local first apps will take off 46:43 Bun keeps doing “wild but loved” non-standard features, Bun will launch a platform-as-a-service 48:22 Vite stays king 51:07 Laravel will release a CMS 52:44 Sick Picks + Shameless Plugs Sick Picks Scott: DARKBEAM Flashlight UV Black Light Wes: WOOZOO Fan 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

24 Des 202556min

965: Baseline 2025 Features web gained in 2025

965: Baseline 2025 Features web gained in 2025

Scott and Wes break down the biggest web platform features that reached Baseline in 2025, separating the genuinely useful APIs from the niche and forgettable ones. From same-document view transitions and the Popover API to Promise.try, content-visibility, and modern CSS goodies, they share what’s actually ready to use today. Show Notes 00:00 Welcome to Syntax! 01:37 24 new web APIs that reached baseline in 2025. 01:49 Same-document view transitions for single-page applications. 05:28 abs() 08:22 Brought to you by Sentry.io. 09:20 JSON Module Scripts. 10:10 Popover API. 13:07 Base64 to UInt8Array. Better Binary Batter Mixing 16:11 @starting-style Scott’s A CSS Only Accordion with Scott’s Mobile Nav 17:39 allow-discrete 21:31 Promise.try 22:51 content-visibility 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 Des 202526min

964: Markdown as a CMS is a bad idea

964: Markdown as a CMS is a bad idea

In this potluck episode of Syntax, Wes and Scott answer your questions about keyboard shortcuts, choosing frameworks in the age of AI, markdown vs CMSs, backup strategies, moving countries for work, staying relevant as a developer, and more! Show Notes 00:00 Welcome to Syntax! 02:28 Do keyboard shortcuts actually improve productivity? Hyperkey 08:41 What is Error Lens, and why use it? Ep 956: Should I Keep Using WordPress? 11:44 How Scott is using a Svelte 5 service worker 14:52 Does tech stack choice still matter with AI coding? Ep 951: A first look at Remix 3 20:15 What stack should you choose for a greenfield SaaS? 22:38 What’s the right stack for a band website? 28:24 Is moving countries for work worth the tradeoff? 34:59 Brought to you by Sentry.io 36:16 How should you manage commits with AI tools? 40:50 Is programming still a good career in the AI era? 47:03 How should you back up large files and media? Ep 949: Web Dev HORROR Stories + Spooky Trivia! (Spooky Stories Pt. 1) Ep 962: The Home Server / Synology Show 53:29 What backup setup works for small teams and clients? 55:14 How should you store sensitive files safely? 58:07 Sick Picks + Shameless Plugs Sick Picks Scott: Philips LED Ultra Definition Wes: LEGO Builder App 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

17 Des 20251h 3min

963: Hardware Hacking with Matt Brown

963: Hardware Hacking with Matt Brown

Scott and Wes chat with YouTuber and security consultant Matt Brown about breaking into IoT devices, extracting firmware, and decoding the hidden tech inside everyday gadgets. Matt shares his methods, the legal boundaries, and the wild stories behind his most interesting hacks. Show Notes 00:00 Welcome to Syntax! 01:21 Curiosity in Hacking 03:28 Understanding IoT Devices 07:15 Brought to you by Sentry.io. 07:40 Linux vs Microcontrollers 10:11 UART Console Access 13:56 Firmware Extraction Techniques 14:19 Guessing Usernames and Passwords 19:22 Extracting Password Hashes 23:15 Legal Considerations in Hacking 30:06 Where does the inspiration come from? 31:20 Using Logic Analyzers 37:45 CAN Protocol in Automotive 45:42 Influence of Lewis Rossman 54:05 Sick Picks & Shameless Plugs Sick Picks Matt: Key Person of Influence Shameless Plugs Matt:Matt Brown on YouTube, Brown Fine Security 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

15 Des 202558min

962: The Home Server / Synology Show

962: The Home Server / Synology Show

Wes and Scott talk about their evolving home-server setups—Synology rigs, Mac minis, Docker vs. VMs, media servers, backups, Cloudflare Tunnels, and the real-world pros and cons of running your own hardware. Show Notes 00:00 Welcome to Syntax! 01:35 Why use a home server? 07:29 Apps for home servers 16:23 Home server hardware 18:27 Brought to you by Sentry.io 20:45 VMs vs containers and choosing the right software 25:53 How to expose services to the internet safely 30:38 Securing access to your server 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

10 Des 202535min

961: Keeping Up With The Fast and Furious Web

961: Keeping Up With The Fast and Furious Web

Scott and CJ go live from JS Nation NYC to talk about how developers can actually stay current without drowning in the constant churn of new tools and trends. They break down how to see through the fluff, focus on why tech exists before adopting it, and build a healthier, curiosity-driven approach to learning in 2025 and beyond. Show Notes 00:00 Welcome to Syntax! 00:39 Scott delivering a non-technical talk at JS Nation. 03:24 Lamenting the frequency of change as developers. 03:46 Understanding why things exist before deciding to learn them. 05:11 Learning styles are a myth? 07:41 First dates and psychology exams. 10:39 Discovering is step one, playing is step two. 13:32 Learn with a project that you actually want. 18:16 Brought to you by Sentry.io. 18:34 Cutting through the noise of new tech. 21:40 Using AI as a learning tool 25:12 Sick Picks & Shameless Plugs. Sick Picks Scott: dbrand Ghost Case 2.0 CJ: analog watches 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 Des 202528min

960: Reacting to the Weird + Creative Corners of the Web

960: Reacting to the Weird + Creative Corners of the Web

Wes and Scott talk about the weird, creative corners of the web—from live-coded music with Strudel and wild Hydra visuals to shader wizardry, projection-mapping art, fully synced Christmas lights, and more. Show Notes 00:00 Welcome to Syntax! 01:10 Strudel https://www.tiktok.com/@dj_dave__/video/7541104277234748685 https://www.tiktok.com/@switch.angel/video/7542776528057257229 03:45 Hydra https://www.tiktok.com/@spacetiger3000/video/7552354878635511095?q=hydra%20video%20synth&t=1762879433461 05:44 P5.js https://www.tiktok.com/@julian_hespenheide/video/7408511121323248929?q=p5.js%20&t=1762879954031 https://www.tiktok.com/@m171148385929472638284/video/7544793538496679190?q=p5.js%20&t=1762879954031 08:03 ShaderToy https://shaders.com/ https://www.shadertoy.com/view/ldlcRf https://www.tiktok.com/@phi.graphics/video/6927475445059292421?q=shadertoy&t=1762879566343 https://www.tiktok.com/@fifi_cgi/video/7255109146062687494?q=shadertoy&t=1762879566343 11:13 Brought to you by Sentry.io 11:37 MadMapper https://www.tiktok.com/@dfiftyd50/video/7556202990529563920 https://www.tiktok.com/@dfiftyd50/video/7569626387577965844?q=projection%20mapping&t=1762879388084 14:13 Touch Designer https://www.reddit.com/r/TouchDesigner/ https://www.tiktok.com/@bedareveryday/video/7558850186601172246?q=Touch%20Designer&t=1762879652502 https://www.tiktok.com/@maze88196/video/7521311510488943894?q=Touch%20Designer&t=1762879652502 https://www.tiktok.com/@valen.bertol/video/7475117172847562039?q=Touch%20Designer&t=1762879652502 16:45 xLights https://www.tiktok.com/@ravespotlight/video/7311729112425516320?q=lights%20christmas&t=1762879799384 https://www.tiktok.com/@thatlightguy_/video/7315199858338565418?q=xlights%20show&t=1762879927155 20:19 Sick Picks + Shameless Plugs Sick Picks Scott: NeueCast Wes: 6 Port 2.5G Unmanaged Ethernet Switch UGREEN USB to Ethernet Adapter 2.5Gb 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 Des 202527min

Populært innen Politikk og nyheter

giver-og-gjengen-vg
aftenpodden
stopp-verden
popradet
lydartikler-fra-aftenposten
bt-dokumentar-2
forklart
det-store-bildet
aftenpodden-usa
dine-penger-pengeradet
fotballpodden-2
rss-gukild-johaug
hanna-de-heldige
aftenbla-bla
rss-penger-polser-og-politikk
rss-ness
e24-podden
oppdatert
rss-borsmorgen-okonominyhetene
ukrainapodden