diff --git a/.changeset/console-log-loader-error.md b/.changeset/console-log-loader-error.md
new file mode 100644
index 0000000000..907f28cc76
--- /dev/null
+++ b/.changeset/console-log-loader-error.md
@@ -0,0 +1,5 @@
+---
+"react-router": patch
+---
+
+Log loader/action errors to the console in dev for easier stack trace evaluation
diff --git a/packages/react-router-dom/__tests__/data-static-router-test.tsx b/packages/react-router-dom/__tests__/data-static-router-test.tsx
index 50d2d7af0f..41fe0a8df6 100644
--- a/packages/react-router-dom/__tests__/data-static-router-test.tsx
+++ b/packages/react-router-dom/__tests__/data-static-router-test.tsx
@@ -21,6 +21,7 @@ import {
beforeEach(() => {
jest.spyOn(console, "warn").mockImplementation(() => {});
+ jest.spyOn(console, "error").mockImplementation(() => {});
});
describe("A
- You can provide a way better UX than this when your app throws errors by providing your ownÂ
+ You can provide a way better UX than this when your app throws errors by providing your own
ErrorBoundary
- prop onÂ
+ or
+
- <Route>
+ errorElement
+ prop on your route.
- You can provide a way better UX than this when your app throws errors by providing your ownÂ
+ You can provide a way better UX than this when your app throws errors by providing your own
ErrorBoundary
- prop onÂ
+ or
+
- <Route>
+ errorElement
+ prop on your route.
- You can provide a way better UX than this when your app throws errors by providing your ownÂ
+ You can provide a way better UX than this when your app throws errors by providing your own
ErrorBoundary
- prop onÂ
+ or
+
- <Route>
+ errorElement
+ prop on your route.
- You can provide a way better UX than this when your app throws errors by providing your ownÂ
+ You can provide a way better UX than this when your app throws errors by providing your own
ErrorBoundary
- prop onÂ
+ or
+
- <Route>
+ errorElement
+ prop on your route.
💿 Hey developer 👋
You can provide a way better UX than this when your app throws errors
- by providing your own
- ErrorBoundary prop on
- <Route>
+ by providing your own ErrorBoundary or{" "}
+ errorElement prop on your route.