Artwork

内容由Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers提供。所有播客内容(包括剧集、图形和播客描述)均由 Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal
Player FM -播客应用
使用Player FM应用程序离线!

React 18 - A Look Ahead

46:39
 
分享
 

Manage episode 297463742 series 1469447
内容由Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers提供。所有播客内容(包括剧集、图形和播客描述)均由 Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal

In this episode of Syntax, Scott and Wes talk about everything coming in React 18!

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.

RevenueCat - Sponsor

RevenueCat makes it easy to build and manage iOS and Android in-app purchases. With a few lines of code, RevenueCat provides IAP infrastructure, customer analytics, data integrations, and gives you time back from dealing with edge cases and updates across the platforms. Created by developers, for developers, thousands of the world’s best apps use RevenueCat to power their in-app purchases and subscriptions. Get started for free at revenuecat.com.

Show Notes

04:32 - Automatic Batching

  • Don’t worry about re-renders

08:32 - New Render API

const root = ReactDOM.createRoot(document.getElementById('root')); root.render();
  • No more hydrate method (yay!)

10:44 - Suspense

  • Suspense is basically a promise resolver component - nothing inside will render until promise is resolved.
  • SuspenseList lets you coordinate the order in which loading indicators show up.

16:43 - StrictEffects Mode

18:43 - useTransition() Hook

  • Not an animation hook. They named it this because of the future ability to add animations to React core.
  • Wrap the state update in a “transition” to prevent the ProfilePage from being unmounted while suspending. This lets React know that it should wait for the update to complete.
  • We classify state updates in two categories:
    • Urgent updates reflect direct interaction, like typing, hover, dragging, etc.
    • Transition updates transition the UI from one view to another.

23:11 - SSR Improvements

  • React.Lazy will work on the Server
  • Finally!
  • https://github.com/reactwg/react-18/discussions/37
  • Server-side rendering (abbreviated to “SSR” in this post) lets you generate HTML from React components on the server, and send that HTML to your users. SSR lets your users see the page’s content before your JavaScript bundle loads and runs.
  • React Server Components

34:45 - ELI5

36:37 - Next.js

  • Next.js will probably have support for a lot of these features soon.
Links ××× SIIIIICK ××× PIIIICKS ××× Shameless Plugs Tweet us your tasty treats!
  continue reading

762集单集

Artwork
icon分享
 
Manage episode 297463742 series 1469447
内容由Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers提供。所有播客内容(包括剧集、图形和播客描述)均由 Wes Bos and Scott Tolinski - Full Stack JavaScript Web Developers 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal

In this episode of Syntax, Scott and Wes talk about everything coming in React 18!

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.

RevenueCat - Sponsor

RevenueCat makes it easy to build and manage iOS and Android in-app purchases. With a few lines of code, RevenueCat provides IAP infrastructure, customer analytics, data integrations, and gives you time back from dealing with edge cases and updates across the platforms. Created by developers, for developers, thousands of the world’s best apps use RevenueCat to power their in-app purchases and subscriptions. Get started for free at revenuecat.com.

Show Notes

04:32 - Automatic Batching

  • Don’t worry about re-renders

08:32 - New Render API

const root = ReactDOM.createRoot(document.getElementById('root')); root.render();
  • No more hydrate method (yay!)

10:44 - Suspense

  • Suspense is basically a promise resolver component - nothing inside will render until promise is resolved.
  • SuspenseList lets you coordinate the order in which loading indicators show up.

16:43 - StrictEffects Mode

18:43 - useTransition() Hook

  • Not an animation hook. They named it this because of the future ability to add animations to React core.
  • Wrap the state update in a “transition” to prevent the ProfilePage from being unmounted while suspending. This lets React know that it should wait for the update to complete.
  • We classify state updates in two categories:
    • Urgent updates reflect direct interaction, like typing, hover, dragging, etc.
    • Transition updates transition the UI from one view to another.

23:11 - SSR Improvements

  • React.Lazy will work on the Server
  • Finally!
  • https://github.com/reactwg/react-18/discussions/37
  • Server-side rendering (abbreviated to “SSR” in this post) lets you generate HTML from React components on the server, and send that HTML to your users. SSR lets your users see the page’s content before your JavaScript bundle loads and runs.
  • React Server Components

34:45 - ELI5

36:37 - Next.js

  • Next.js will probably have support for a lot of these features soon.
Links ××× SIIIIICK ××× PIIIICKS ××× Shameless Plugs Tweet us your tasty treats!
  continue reading

762集单集

Wszystkie odcinki

×
 
Loading …

欢迎使用Player FM

Player FM正在网上搜索高质量的播客,以便您现在享受。它是最好的播客应用程序,适用于安卓、iPhone和网络。注册以跨设备同步订阅。

 

快速参考指南