React Native + Worker + KV

Hello, I'm currently making a React Native app and I'm trying to get/send data to my KVs in cloudflare, however I'm not getting this to work. I'm new to cloudflare and workers in general, help would be appreciated. This is my fetch request currently, I don't know what to put in my worker to communicate with the KVs:
fetch('WORKER_URL', {method: 'GET'}).then((response) => response.json()).then((json) => {
console.log(json);
}).catch((error) => {
console.error(error);
});
fetch('WORKER_URL', {method: 'GET'}).then((response) => response.json()).then((json) => {
console.log(json);
}).catch((error) => {
console.error(error);
});
My worker is currently just default with the Response Hello world due to not knowing what to do.
1 Reply
Hzia
HziaOP11mo ago
Do i need to create the wrangler.toml in my local project files or the quick edit thing in cloudflare of my worker? I managed to receive data from a KV finally, forgot to add the KV namespace binding in the dashboard thing under Settings > Variables, Appreciate the help.
Want results from more Discord servers?
Add your server