import { json, LoaderFunction, useLoaderData } from "remix";
      export const loader: LoaderFunction = async ({ params }) => {
        const myData = {};
        return json(myData);
      export default function Component() {
        const data = useLoaderData();
        return <main></main>;

      Typescript language logo
      your recipe card header background
      Create Component with loader function

      Remix TypeScript public recipes

      The code exports a function called loader which takes an asynchronous function as its only argument. The function returns a JSON object.

      Shortcut: remix.component.with_loader.create


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.