MCPcopy Create free account
hub / github.com/Shopify/function-examples / loader

Function loader

sample-apps/discounts/app/root.jsx:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10import { json } from "@remix-run/node";
11
12export async function loader() {
13 const apiKey = process.env.SHOPIFY_API_KEY;
14 return json({ apiKey });
15}
16
17export default function App() {
18 const { apiKey } = useLoaderData();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected