github remix-run/remix remix@1.7.4
v1.7.4

latest releases: remix@2.12.1-pre.0, create-remix@2.12.1-pre.0, @remix-run/testing@2.12.1-pre.0...
23 months ago

What Changed

Patch Changes

  • You can now infer the type of the .data property of fetchers from your action and loader functions. This works similarly to our type inference of useLoaderData by providing the type of the action or loader function at the useFetcher call site.

    export async function loader(args: LoaderArgs) {
      return json({
        user: {
          name: "Chance",
          twitter: "@chancethedev",
          age: 36,
        },
      });
    }
    
    function SomeComponent() {
      let fetcher = useFetcher<typeof loader>();
      if (fetcher.data) {
        let userName = fetcher.data.user.name; // string
        let userAge = fetcher.data.user.age; // number
      }
    }
  • Fixed a bug in <Form> that prevented the correct method from being called with non-POST submissions

Changes by package

New Contributors


Full Changelog: v1.7.3...v1.7.4

Don't miss a new remix release

NewReleases is sending notifications on new releases.