Loader external data

    0

    0

    Jose Romero

    Remix JavaScript public recipes

    Loader that takes take from an external API

    Library: remix

    Shortcut: remix.loader.api

    import { json } from "remix";
    
    export async function loader() {
      const res = await fetch("https://path/to/endpoint");
      return json(await res.json());
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.