Swizec Teller - a geek with a hatswizec.com

    Why I'm excited about React 18 – talk

    React 18 is coming soon. I hope 🀞

    React 18 is the one with Suspense. The major refactor that enables transparent asynchronous rendering.

    Yes that means you can load data without async functions and draw large animations that skip frames without UI blocking.

    I showed off what that means with 2 demos at a React Dinners talk during the summer. It was lots of fun. Everyone went "Wow shiny" at suspense-for-cpu and "Omg gimme now I need this!" at suspense-for-fetch. Solves a huge pain in the ass.

    The suspense-for-cpu portion is based on A better React 18 startTransition demo where I use a fractal as the worst case scenario for React rendering. Works without custom performance tricks ✌️

    startTransition recap

    The suspense-for-fetch portion is based on React 18 and the future of async data

    Swizec Teller published ServerlessHandbook.dev avatarSwizec Teller published ServerlessHandbook.dev@Swizec
    It just hit me that idiomatic <Suspense> for data fetching means there's no async, await, or promise anywhere. Shit just works 🀯

    this is huge

    You can try startTransition with React alpha versions right now, fetch is under the experimental flag. Coming in 18.x

    Can't wait

    Swizec Teller published ServerlessHandbook.dev avatarSwizec Teller published ServerlessHandbook.dev@Swizec
    So I was giving a talk about React 18 last night (video soon) and something interesting happened

    The Suspense-for-cpu demo got all the oohs and aahs

    But Suspense-for-fetch got all the "OMG can't wait to try this 😍"

    Solve A Painful Problem really does beat shiny demos πŸ€”

    Cheers,
    ~Swizec

    Did you enjoy this article?

    Published on November 1st, 2021 in React, Talks

    Learned something new?
    Want to become an expert?

    Here's how it works πŸ‘‡

    Leave your email and I'll send you thoughtfully written emails every week about React, JavaScript, and your career. Lessons learned over 20 years in the industry working with companies ranging from tiny startups to Fortune5 behemoths.

    Join Swizec's Newsletter

    And get thoughtful letters πŸ’Œ on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.

    "Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. πŸ‘Œ"

    ~ Ashish Kumar

    Join over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer?Β I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

    Ready to Stop copy pasting D3 examples and create data visualizations of your own? Β Learn how to build scalable dataviz components your whole team can understand with React for Data Visualization

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first πŸ’° on the side with ServerlessReact.Dev

    Want to brush up on your modern JavaScript syntax?Β Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❀️

    Created by Swizec with ❀️