How do I access KV values in Cloudflare react app

138 views Asked by At

I am trying to read a KV from React App, but it won't work

  • I've created a binding and if I try env.Name, the app throws an error with env not defined,
  • So I tried the functions and I can see the functions route on the deployed app but then when I try to get the value using fetch ('/MyKeyName'), it throws a 500 internal server error.

What is the best way to read Cloudflare KV in React?

0

There are 0 answers