• Error Monitoring
  • Logs
  • Session Replay
  • Tracing
  • Seer
  • Uptime Monitoring
  • Profiling
  • Cron Monitoring
  • AI Code Review
  • Github
  • Slack
  • All Integrations
  • Javascript
  • Python
  • React
  • Laravel
  • Next.js
  • All SDKs

Solutions

  • Web / Frontend Development
  • Mobile Crash Reporting
  • Game Crash Reporting
  • AI Observability
  • Application Performance Monitoring
  • Real User Monitoring
  • Ecommerce
  • Enterprise
  • Blog
  • Changelog
  • Sandbox
  • Resources
  • Sentry Answers
  • Syntax
  • Customers
  • For Startups
  • Contact Us
  • Help Center
  • Status
  • Sentry Build
  • Events
  • Merch
Docs
Pricing
Sign InGet DemoGet Started
  • Products

    • Error Monitoring
    • LogsNEW
    • Session Replay
    • Tracing
    • SeerNEW
    • Uptime Monitoring
    • Profiling
    • Cron Monitoring
    • AI Code ReviewNEW

    Products

    • Error Monitoring
    • LogsNEW
    • Session Replay
    • Tracing
    • SeerNEW
    • Uptime Monitoring
    • Profiling
    • Cron Monitoring
    • AI Code ReviewNEW

    Integrations

    • Github
    • Slack
    • All Integrations

    Integrations

    • Github
    • Slack
    • All Integrations

    SDKs

    • Javascript
    • Python
    • React
    • Laravel
    • Next.js
    • All SDKs

    SDKs

    • Javascript
    • Python
    • React
    • Laravel
    • Next.js
    • All SDKs
  • Solutions

    • Web / Frontend Development
    • Mobile Crash Reporting
    • Game Crash Reporting
    • AI Observability
    • Application Performance Monitoring
    • Real User Monitoring
    • Ecommerce
    • Enterprise
  • Learn

    • Blog
    • Changelog
    • Sandbox
    • Resources
    • Sentry Answers
    • Syntax
    • Customers
    • For Startups

    Learn

    • Blog
    • Changelog
    • Sandbox
    • Resources
    • Sentry Answers
    • Syntax
    • Customers
    • For Startups

    Support

    • Contact Us
    • Help Center
    • Status

    Support

    • Contact Us
    • Help Center
    • Status

    Hang out with us

    • Sentry Build
    • Events
    • Merch

    Hang out with us

    • Sentry Build
    • Events
    • Merch
    Holiday E-Commerce Checklist: A Developer’s Survival Guide

    Holiday E-Commerce Checklist: A Developer’s Survival Guide

    There’s never a good time for errors or performance degradations to show up, but during periods of peak traffic like the holidays, it’s especially critical to get immediate answers about what's failing and how to fix it.

    Learn More
  • Docs
  • Pricing
Sign InGet DemoGet Started
Sentry Changelog Illustration

Sentry Changelog

Follow Twitter@SentryChangelog to stay up to date on everything from product updates to SDK changes.

Categories:

Jump to:

React 19 Support

8.6.0 of the Sentry React and Next.js SDKs add support for React 19 and its new error handling hooks. This means that Sentry will automatically attach your component stack to every new error, making it easy to know where to look in your component tree for debugging.

If you are using react-dom directly, you can define the onUncaughtError and onCaughtError hooks to get extra component related information attached to your React errors. Learn more here .

import { createRoot } from "react-dom/client";

const container = document.getElementById("app");
const root = createRoot(container, {
  // Callback called when an error is thrown and not caught by an ErrorBoundary.
  onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
    console.warn('Uncaught error', error, errorInfo.componentStack);
  }),
  // Callback called when React catches an error in an ErrorBoundary.
  onCaughtError: Sentry.reactErrorHandler(),
  // Callback called when React automatically recovers from errors.
  onRecoverableError: Sentry.reactErrorHandler(),
});
root.render();
June 17, 2024
Your code is broken. Let's Fix it.
Get Started