Cloudflare DevelopersCD
Cloudflare Developers3y ago
3 replies
mattp

https developers cloudflare com pages

https://developers.cloudflare.com/pages/framework-guides/deploy-a-qwik-site/#use-bindings-in-your-qwik-application
The example in this section is incorrect, it should be:
export const useKVData = routeLoader$(({ platform }) => {
  // This is wrong:
  // const { MY_KV } = (platform as { MY_KV: KVNamespace }));
  const { MY_KV } = platform.env;
  return {
    // ....
  }
});
Was this page helpful?