From ef5cf820b196c3c0f3d507dedb27d75cd8b48e49 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Tue, 15 Oct 2024 10:11:58 -0400 Subject: [PATCH] fix: remove usage of defineLoader (#441) --- examples/playground/app/routes/_layout.loader-error.tsx | 6 ++---- .../playground/app/routes/_layout.resource-route-error.tsx | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/playground/app/routes/_layout.loader-error.tsx b/examples/playground/app/routes/_layout.loader-error.tsx index 6e83d401..7ef637bd 100644 --- a/examples/playground/app/routes/_layout.loader-error.tsx +++ b/examples/playground/app/routes/_layout.loader-error.tsx @@ -1,8 +1,6 @@ -import { unstable_defineLoader as defineLoader } from "@remix-run/node"; - -export const loader = defineLoader(() => { +export function loader() { throw new Error("This is an error"); -}); +} export default function Component() { return

You'll never see this

; diff --git a/examples/playground/app/routes/_layout.resource-route-error.tsx b/examples/playground/app/routes/_layout.resource-route-error.tsx index 3ec82fbc..85cdab85 100644 --- a/examples/playground/app/routes/_layout.resource-route-error.tsx +++ b/examples/playground/app/routes/_layout.resource-route-error.tsx @@ -1,5 +1,3 @@ -import { unstable_defineLoader as defineLoader } from "@remix-run/node"; - -export const loader = defineLoader(() => { +export function loader() { throw new Error("This is an error"); -}); +}