github remix-run/remix @remix-run/cloudflare@1.6.5-pre.1

latest releases: v0.0.0-nightly-38ca648a3-20240920, remix@2.12.1, create-remix@2.12.1...
pre-release2 years ago

Patch Changes

  • We enhanced the type signatures of loader/action and useLoaderData/useActionData to make it possible to infer the data type from return type of its related server function.

    import type { LoaderArgs } from "@remix-run/cloudflare";
    
    export async function loader(args: LoaderArgs) {
      return json({ greeting: "Hello!" }); // TypedResponse<{ greeting: string }>
    }
    
    export default function App() {
      let data = useLoaderData<typeof loader>(); // { greeting: string }
      return <div>{data.greeting}</div>;
    }

    See the discussion in #1254 for more context.

  • Updated dependencies

    • @remix-run/server-runtime@1.6.5-pre.1

Don't miss a new remix release

NewReleases is sending notifications on new releases.