Logo
    Search

    Podcast Summary

    • Benefits of using React HooksHooks simplify code, improve performance, and enable component logic sharing in React development. Sentry at century.io is a valuable tool for error tracking and monitoring.

      React Hooks offer several benefits over class components, making them a compelling choice for modern React development. The incentive to switch to function components using Hooks lies in their simplicity, improved performance, and flexibility. Hooks allow developers to use state and other React features without writing a class, making the code cleaner and easier to read. They also enable the use of Hooks between components, making it simpler to share logic between different parts of the application. Additionally, Hooks can help improve performance by reducing the number of components in the React tree, as well as allowing for more fine-grained control over component rendering. Finally, Sentry at century.io is a valuable tool for error tracking and monitoring, which can help developers quickly identify and resolve issues in their applications. The service's continuous improvements and user-friendly interface make it an essential part of any developer's toolkit.

    • React Hooks at Sentry.io: Decoupling logic from componentsReact Hooks enable developers to manage state and logic outside of components, making code more modular, easier to understand, and reusable. UseEffect handles side effects, and libraries like rehooks simplify implementation.

      React Hooks in Sentry at Sentry.io have significantly changed the way developers manage state and logic in React applications. By decoupling logic from components, developers can now easily reuse and share functionality between components, making the codebase more modular and easier to understand. This is a departure from the traditional approach of building UI components, and it allows for a more flexible and efficient way of working. Side effects, which refer to actions taken outside the scope of a component, can be managed using hooks like useEffect. This enables developers to run code in response to specific events or changes, leading to improved code quality and a better understanding of how different parts of the application interact. Furthermore, the availability of libraries like rehooks, which provide pre-built hooks, makes it even easier to implement and share functionality across projects. Overall, the use of React Hooks represents a major shift in the way React applications are built, and it offers numerous benefits in terms of code organization, reusability, and overall development experience.

    • Simplifying state and side effects management in ReactHooks have made it easier to manage state and side effects in functional components, allowing for more organized and readable code, and enabling new features like GraphQL code generation.

      React Hooks have significantly improved the development experience in React by making complex coding tasks simpler and more manageable. Before Hooks, developers had to use higher-order components or render props to manage state and side effects in functional components. However, these methods were not ideal, especially when dealing with multiple pieces of state or functionality. With Hooks, developers can manage state and side effects in separate hooks, making the code more organized and easier to read. This has led to a "state renaissance" in React, with libraries like Context now working more seamlessly with Hooks. Additionally, Hooks have made possible features like GraphQL code generation, which can automatically generate typed React hooks based on a schema. Overall, Hooks have simplified the development process in React, making it easier to write and manage complex code.

    • Managing state and side effects with hooksHooks provide easier access to state and allow for sharing state across components and libraries, reducing code duplication and improving efficiency in React projects

      The use of hooks in React development has significantly improved the way we manage state and side effects in our components. With hooks, we now have access to the user's state within the body of a function, making it easier to share state across components and libraries like Zustand and Jotai. Additionally, hooks have led to a reduction in code duplication, as seen with useEffect, which allows us to target specific dependencies and run functions only when those dependencies change. This shift towards hooks has resulted in a more streamlined and efficient way of managing state and side effects in React projects.

    • Simplifying codebase with React hooksUsing hooks like useState and useEffect reduced code complexity, eliminated duplicate code, and made state updates more efficient.

      Using React hooks instead of classes has significantly reduced the complexity and size of the speaker's codebase. They were able to delete duplicate code, simplify custom methods, and make state updates more efficient using hooks like useState and useEffect. The use of hooks also eliminated the need for multiple if statements when only specific parts of the state needed to be updated. The speaker acknowledged that there are some gripes about the name and potential complexities of useEffect, but overall, the benefits of using hooks have made their code easier to read and understand. They also suggested that taking the time to convert a larger portion of the codebase to hooks could help developers better understand the use cases and advantages of hooks. The speaker has successfully converted their entire codebase, despite the recommendation against doing so, and they believe that the experience has deepened their understanding of hooks.

    • React Hooks vs Class ComponentsSpeaker prefers functional components for simplicity, but classes are still useful for complex APIs, and Hooks simplify state management and refs

      The speaker prefers using functional components over class components in React development due to their simplicity and explicitness. However, classes are not going away entirely, especially when dealing with complex APIs like Braintree, where explicit and straightforward methods are beneficial. The speaker also appreciates the ease of using hooks for state management and refs, which have become more intuitive and streamlined compared to their previous implementations. Overall, the speaker values the evolution of React Hooks and their ability to simplify and improve the development experience.

    • Using explicit functions and imports in JavaScriptExplicit functions and imports can make codebase more predictable, easier to debug, and consistent. Personal experience shows benefits over implicit returns and default exports.

      Using explicit functions and imports in JavaScript, instead of implicit returns and default exports, can lead to easier debugging and more consistent code. The speaker shared their personal experience of giving up on implicit returns and default exports due to frustration with debugging and the inability to use hooks or easily rename components. Instead, they now prefer to use named functions and explicit imports. In the context of Next.js, the speaker doesn't maintain any applications and didn't discuss the specific benefits of using explicit imports in that framework. Overall, the explicit approach can make the codebase more predictable and less prone to errors, leading to a smoother development experience.

    • React Hooks: Naming and Availability ConcernsDevelopers prefer explicit typing and practices as codebases expand, but feel confusion over some React Hooks' names and frustration with lack of built-in support for common functions

      As the codebase grows and developers move towards more explicit approaches like TypeScript, they have come to prefer less magic in their code. The benefits of explicit typing and other explicit practices become more apparent as codebases expand, making it harder to keep track of everything. The speaker also expressed some confusion over the naming of certain React hooks, feeling that they could have been more descriptive. Despite these gripes, the speaker acknowledged that once learned, the hooks work well. However, they expressed frustration with the lack of built-in support for common functions like setInterval and setTimeout, and the need to install additional hooks for their use. Additionally, there is a debate over whether to use sync await inside an async useEffect function for fetching data. Overall, the speaker's main concerns revolve around the naming and availability of certain features in React Hooks.

    • React Hooks vs Svelte Composition APIReact Hooks have evolved, but handling side effects and cleanup can be complex. Svelte's Composition API simplifies these tasks with clear naming conventions and features.

      When it comes to using React Hooks versus using a library like Svelte with its composition API, there are advantages and disadvantages to each approach. The React Hooks have evolved significantly since their introduction, and developers have gained a better understanding of how to use them effectively. One notable issue with using Hooks is the need to handle side effects and cleanup using either promise-based syntax or a secondary function, which can get complex. On the other hand, libraries like Svelte have implemented solutions that address these concerns more intuitively. For instance, the Vue composition API, which was created by the Vue team, uses clear naming conventions like "watchEffect" and "onCleanup" to make the intended usage more apparent. Additionally, Svelte allows for the use of async directly within the watch effect, eliminating the need for an additional function call for data fetching. These naming conventions and features make the Svelte composition API an appealing alternative for some developers, as they simplify the process of handling side effects and cleanup. However, it's important to remember that both libraries have their strengths and weaknesses, and the choice between them ultimately depends on the specific needs and preferences of the developer or team.

    Recent Episodes from Syntax - Tasty Web Development Treats

    789: Do More With AI - LLMs With Big Token Counts

    789: Do More With AI - LLMs With Big Token Counts

    Join Scott and CJ as they dive into the fascinating world of AI, exploring topics from LLM token sizes and context windows to understanding input length. They discuss practical use cases and share insights on how web developers can leverage larger token counts to maximize the potential of AI and LLMs.

    Show Notes

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    788: Supabase: Open Source Firebase for Fullstack JS Apps

    Scott and CJ chat with Paul Copplestone, CEO and co-founder of Supabase, about the journey of building an open source alternative to Firebase. Learn about the tech stack, the story behind their excellent documentation, and how Supabase balances business goals with open-source values.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 Who is Paul Copplestone?
    • 01:17 Why ‘Supa’ and not ‘Super’?
    • 02:26 How did Supabase start?
    • 08:42 Simplicity in design.
    • 10:32 How do you take Supabase one step beyond the competition?
    • 12:35 How do you decide which libraries are officially supported vs community maintained?
      • 15:17 You don’t need a client library!
    • 16:48 Edge functions for server-side functionality.
    • 18:51 The genesis of pgvector.
    • 20:59 The product strategy.
    • 22:25 What’s the story behind Supabase’s awesome docs?
    • 25:26 The tech behind Supabase.
    • 35:46 How do you balance business goals with open source?
    • 42:01 What’s next for Supabase?
    • 44:15 Supabase’s GA + new features.
    • 48:24 Who runs the X account?
    • 50:39 Sick Picks + Shameless Plugs.

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    CJ: X Instagram YouTube TwitchTV

    Randy: X Instagram YouTube Threads

    787: You Should Try Vue.js

    787: You Should Try Vue.js

    Scott and CJ dive deep into the world of Vue.js, exploring what makes this frontend framework unique and why it stands out from React and Svelte. CJ gives a comprehensive tour, covering everything from getting started to advanced features like state management and Vue’s built-in styles.

    Show Notes

    Vue.js: The Documentary.

    Sick Picks

    Shameless Plugs

    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

    786: What Open Source license should you use?

    786: What Open Source license should you use?

    Scott and CJ dive into the world of open source, breaking down its meaning, benefits, and the various types of licenses you’ll encounter. From permissive licenses like MIT and Apache 2.0 to copy-left licenses such as GNU GPLv3, they’ll help you choose and apply the right license for your project.

    Show Notes

    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

    785: What’s Next for NextJS with Tim Neutkens

    785: What’s Next for NextJS with Tim Neutkens

    Scott and Wes dive into the world of Next.js with special guest Tim Neutkens from Vercel. They explore the latest updates, including the React Compiler and React Server Components, discussing their impact on developer workflows and the future of Next.js development.

    Show Notes

    • 00:00 Welcome to Syntax!
    • 00:30 What does the React Compiler do?
    • 05:04 Will React Compiler help with managing Context?
    • 06:39 What happens if you’re not using a React Compiler?
    • 09:30 Will this work on any NextJS version?
    • 12:18 What are React Server Components?
    • 16:28 Shipping all the data inside an encapsulated component.
    • 20:17 Clearing up the frustrations around retrofitting server components.
    • 23:13 Handing migration.
    • 28:30 Is this just a fetch request with props?
    • 36:41 How closely are the NextJS and React teams working?
    • 41:53 Will we ever get Async Client Components?
    • 43:52 Async Local Storage API.
    • 45:31 Turbopack.
    • 57:51 Sick Picks & Shameless Plugs.

    Sick Picks

    Shameless Plugs

    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

    784: Logging × Blogging × Testing × Freelancing

    784: Logging × Blogging × Testing × Freelancing

    In this Potluck episode, Scott and Wes tackle listener questions on modern blogging, website environmental impact, and using LangChain with LLMs. They also cover CSS hyphens, unit vs. integration testing, and balancing web development with new parenthood.

    Show Notes

    Sick Picks

    Shameless Plugs

    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

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    783: How We Built a Netflix Style “Save for Offline” Feature Into Syntax

    Scott and Wes dive into the world of browser caching for audio files, exploring the File System API and the Cache API. They discuss size restrictions across different browsers, how tools like Riverside.fm leverage IndexedDB, and walk through code examples for creating, retrieving, and managing cached audio data.

    Show Notes

    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

    782: The Developer’s Guide To Fonts with Stephen Nixon

    782: The Developer’s Guide To Fonts with Stephen Nixon

    Scott and CJ are joined by Stephen Nixon of ArrowType to delve into the world of fonts and type for developers. They explore the intricacies of font creation, the utility of variable fonts, and offer tips for making visually appealing typography on the web.

    Show Notes

    Sick Picks

    Shameless Plugs

    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

    781: Potluck - The Value of TypeScript × Vue vs Svelte × Leetcode

    781: Potluck - The Value of TypeScript × Vue vs Svelte × Leetcode

    In this potluck episode of Syntax, Scott and CJ serve up a variety of community questions, from the nuances of beginner vs. advanced TypeScript to the pros and cons of SvelteKit. They also discuss falling out of love with React, shipping private packages via NPM, and the eternal struggle of always starting but never finishing projects.

    Show Notes

    Sick Picks

    Shameless Plugs

    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

    780: Cloud Storage: Bandwidth, Storage and BIG ZIPS

    780: Cloud Storage: Bandwidth, Storage and BIG ZIPS

    Today, Scott and Wes dive into cloud storage solutions—why you might need them, how they use them, and what you need to know about the big players, fees, and more.

    Show Notes

    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

    Related Episodes

    React Hooks

    React Hooks

    In this episode Wes and Scott discuss React Hooks - what they are, why you might want to use them, their differences with regular classes, 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 errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry.io and using the coupon code “tastytreat”.

    Show Notes

    2:30

    • Function components

    4:50

    • What are React hooks?

    8:12

    • What problem does this solve?

    12:00

    • State hooks

    21:50

    • Context hooks

    26:02

    • Effect hooks

    36:46

    40:40

    • Ref Hooks

    48:00

    50:30

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats!

    React Fundamentals (Over)Simplified

    React Fundamentals (Over)Simplified

    In this rad podcast episode, Seth Whiting and Jake Pacheco totally dive into the gnarly basics of React. They're like, "Dude, React is the bomb in web development right now!" They chat about how React components rock, helping you keep your code organized and reusable. And, man, React's JSX is the raddest thing, letting you mix HTML right into your JavaScript.

    They also drop the idea of this epic tool that could one day translate code between different frameworks, making devs' lives way easier, although it's not around yet.

    Seth gets into the nitty-gritty, talking about functional components, which are like the new hotness. No more bulky class components, dude! Then they hit you with React hooks, especially the useEffect one, for managing side effects.

    They shift gears to how you can actually use React hooks, focusing on the useState hook for keeping track of your state variables. Seth breaks it down, showing how to set up and use state with useState. Think of it like catching a wave with a loading state, and when the data's all set, you switch it up.

    Later, they get all stoked about the core React hooks: useState, useEffect, and useContext. These hooks are like the heart of React, helping you with state, side effects, and sharing data, man. They mention some other hooks like useCallback and useMemo, which are handy in special situations, but not as rad as the big three.

    And remember, dudes, keep riding that learning wave. Even when it feels repetitive, it's all about getting that muscle memory for React. Practice makes perfect, so keep shredding the code, bro!

    Special thanks to Diarrhea Planet for our intro and outro music and @SkratchTopo for our artwork.

    React Hooks - 1 Year Later

    React Hooks - 1 Year Later

    In this episode of Syntax, Scott and Wes talk about React Hooks, one year later — what’s changed, how to use them, and more!

    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.

    Sentry - Sponsor

    If you want to know what’s happening with your errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry.io and using the coupon code “tastytreat”.

    Show Notes

    1:26 - Hooks vs Render Props

    • Hooks win hands down
    • useState
    • useReducer
    • useRef
    • useContext
    • useEffect
    • Custom hooks to hide and encapsulate functionality

    35:06 - How we use them

    • Scott

      • Index that imports all custom hooks
      • Babel alias to hooks folder
      • Import { useHook } from ‘hooks’
      • useContextState
    • Wes

      • useResizeObserver
      • useForm
      • useGridRower
      • useWickedFavIcon

    45:54 - Which built-in hooks do we not use?

    • useImperativeHandle
    • useCallback
    • useDebugValue

    48:22 - Are hooks harder to learn?

    • Wes: Yes — but easier to maintain after the fact
    • Scott: Yes — harder conceptually and initially but easier after concepts are understood

    50:29 - Are classes going away?

    • Wes: I say yes
    • Scott: Double yes

    Links

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    • Scott: All Courses - Sign up for the year and save 25%!
    • Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off!

    Tweet us your tasty treats!

    718: React Server Components

    718: React Server Components

    Wes and Scott talk through server components, the difference between server components and client components, reasons to run something server side, how server components work, using forms and buttons, what they like and don’t like about it, and tips to learn more.

    Show Notes

    Sick Picks

    Shameless Plugs

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    226: Sarah's Acting Job, Mythbusting, & Mommy & Me Fashion

    226: Sarah's Acting Job, Mythbusting, & Mommy & Me Fashion
    Sarah busts out a food fun fact that blows our mind. We learn about a company that will rent a family to you if you've lost a loved one or are estranged from your family. Sarah talks about how an airline keeps a dead body closet in case somebody dies mid-flight. Susie shares the history of Mommy & Me fashion. We debate the Yanny/Laurel phenomenon. Plus, we interview Mythbusters star, Kari Byron about her career, being a woman in a male-dominated field, & being pregnant on TV. See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.