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

latest releases: v0.0.0-nightly-417ecc42b-20241109, remix@2.14.0, @remix-run/testing@2.14.0...
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/node";
    
    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.