This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not remove hooks in other components
closes #3
- Loading branch information
1 parent
b58830d
commit a760fa6
Showing
3 changed files
with
115 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
source: src/codemod.rs | ||
description: "import { useLoaderData } from '@remix-run/react';\n\nexport const loader = () => 42;\n\nexport default function Route() {\n const data = useLoaderData<typeof loader>();\n}\n\nfunction Internal() {\n const data = useLoaderData<typeof loader>();\n}\n\nexport function Exported() {\n const data = useLoaderData<typeof loader>();\n}\n" | ||
expression: "codemod(&input, source_type).unwrap()" | ||
--- | ||
import { useLoaderData } from '@remix-run/react'; | ||
|
||
|
||
|
||
function Internal() { | ||
const data = useLoaderData<typeof loader>(); | ||
} | ||
|
||
export function Exported() { | ||
const data = useLoaderData<typeof loader>(); | ||
} | ||
|
||
export default defineRoute({ | ||
Component({ loaderData: data }) { | ||
}, | ||
serverLoader: () => 42, | ||
}); |