#ErrorBoundaries
Wait... why can't we have functional ErrorBoundaries in React again?
May 11, 2025 at 3:41 AM
Problem: I want to test my React app's error boundaries.

Solution: Force an error via search params.

This hook throws an error when a "throwError" search param is present. I use this to test my ErrorBoundaries in my automated tests too.
November 8, 2024 at 3:38 PM
errorBoundaries should also have a hook equivalent, but they don't yet. It's better to just disable this rule in-line if you write it once. Zero lint violations isn't the goal (never was) - it's about not adding new anti-patterns with new code, then fix the existing ones over time.
November 25, 2024 at 8:07 AM
Yeah for sure. And we have that in 1.0. Although we haven't connected it to the ErrorBoundaries because we didn't support Actions. And we have a `useAction` in our router that does similar. So I like this consolidation. It's just been form errors like blowing up the whole form doesn't seem great.
September 10, 2025 at 5:49 PM
This is good though! The VDOM _really_ likes boundaries since Fiber+ and it's why we get things like ErrorBoundaries and Suspense introduced afterwards
June 27, 2025 at 2:25 PM
Things in the ... spooky um swamp, at now getting SCARY.

By being able to ~conjure~ the

1) suspense and SSR lazy loading pattern with
2) code splitting on page sections with
3) adequate react router handling paradigms with errorBoundaries, interstitial placements and reusable designs
October 24, 2025 at 3:04 PM
I did a claude+codex pass in the react repo and implemented native ErrorBoundaries that work across SSR and client.

It's pretty fluid - there are some design decisions that need to be made, but it would be nice if React shipped a native <ErrorBoundary /> with server-side recovery.
September 14, 2026 at 6:48 PM
React Suspense and Error Boundaries can silently fail to show fallback UI. Learn why their interaction causes blank screens and how to debug effectively. #React #Suspense #ErrorBoundaries #Debugging #ReactInternals https://blog.mspk.me/posts/react-suspense-and-error-boundaries-how-they-interact-and-
August 6, 2026 at 2:02 PM
From my understanding this error arises when people don't use ErrorBoundaries (or global-error.tsx in next). I think you're very right that the error story could be massively improved in both next and React.

I think as someone who's an old-school web developer, you'd actually like the RSC design.
June 14, 2025 at 9:20 PM
Great point. I’d treat ErrorBoundaries as an application concern rather than a Stepperize concern. Stepperize should orchestrate flow, while runtime error recovery belongs to the UI layer. That said, documenting an ErrorBoundary pattern for production apps sounds like a good addition.
June 26, 2026 at 12:27 AM
React Router v7: The Evolution React Needed
If you're reading this, you're probably working with React or learning how to use it. And if that’s the case, you’ve surely heard of `react-router`, the most popular library for routing in React apps for years. But what you may not know is that in its latest version, React Router has evolved significantly. It now incorporates concepts from **Remix** like `loaders`, `actions`, `ErrorBoundaries`, `SSR support`, and more. **Remix**? That’s right. The Remix framework has always been built on top of React Router. But with this new version (v7), the experience has been unified—now you can use that same architecture directly in React Router, without needing to adopt a full framework. ## What Does React Router v7 Offer? The best way to understand what React Router v7 brings is by looking at its **three usage modes** , each designed for different levels of complexity and application needs: 1. Declarative Mode 2. Data Mode 3. Framework Mode Let’s break down what each one is and when to use them. ### Declarative Mode This is the classic approach you’re probably already familiar with. You use components like `<Routes>` and `<Route>` to define your routes, along with hooks like `useNavigate`, `useParams`, and so on. <Routes> <Route index element={<Home />} /> <Route path="about" element={<About />} /> <Route element={<AuthLayout />}> <Route path="login" element={<Login />} /> <Route path="register" element={<Register />} /> </Route> <Route path="concerts"> <Route index element={<ConcertsHome />} /> <Route path=":city" element={<City />} /> <Route path="trending" element={<Trending />} /> </Route> </Routes> This mode is perfect if you want a simple SPA using your own bundler (Vite, Webpack...), managing state with Zustand, Redux, or react-query, and you don’t need server-side rendering (SSR). ### Data Mode This is where React Router v7 really transforms. Instead of using components to define routes, you use a route config object. Each route can have a loader (to fetch data) and an action (to handle forms or mutations). const router = createBrowserRouter([ { path: "/", element: <div>Hello World</div>, }, ]); ReactDOM.createRoot(document.getElementById("root")).render( <RouterProvider router={router} /> ); A more complete example with a `loader` and `action`: createBrowserRouter([ { path: "/items", loader, action, Component: Items, }, ]); async function loader() { const items = await fakeDb.getItems(); return { items }; } async function action({ request }) { const data = await request.formData(); await fakeDb.addItem({ title: data.get("title") }); return { ok: true }; } function Items() { const data = useLoaderData(); return ( <div> <TodoList items={data.items} /> <Form method="post"> <input type="text" name="title" /> <button type="submit">Crear</button> </Form> </div> ); } This mode is ideal if you're building a complex SPA and want to avoid useEffect chaos, centralizing your data flow. You can also keep your current stack and deploy wherever you want (Vercel, Netlify, Firebase, etc.). 📌 I recommend checking out this ejemplos, and stay tuned—I'll be publishing more articles on how to make the most of this mode. ### Framework Mode This mode turns React Router into a full framework with SSR support. You start from scratch using a CLI, and it’s designed for apps that need SEO or super-fast initial loads. It has the best TypeScript support, shares the `loaders` and `actions` concept from Data Mode, and gives you full control. 👉 However, keep in mind: * You need to define your deployment setup from the start. * Not all libraries work well with SSR. * Your team should understand the difference between CSR and SSR. * It works best with Tailwind or styling approaches compatible with SSR. That said, if your app is private or doesn’t need SEO, I’d recommend sticking with Declarative or Data Mode to avoid unnecessary complexity. ## So, Is It Worth It? Many React frameworks are adding complexity to the frontend with their latest updates. React Router v7 gives you a clear, flexible alternative: * Start with Declarative Mode if you just need routing. * Move to Data Mode to better manage data and forms. * And go full Framework Mode only if SSR is truly required. All without locking yourself into a single approach from day one. 💡 In upcoming posts, I’ll dive deeper into `loaders`, `actions`, and data-mode architecture—building projects from scratch, testing, and real-world integrations. Are you interested in React Router v7? Want to see practical examples or comparisons with other solutions? Let me know in the comments—I’d love to hear from you.
dev.to
May 28, 2025 at 7:35 PM