saltytostitos
Best way to save user context to avoid needing to fetch at every page?
The most simple and rudimentary way to save some state is
There are many best practices for something like this, but useState will get the job done.
Context: https://nuxt.com/docs/api/composables/use-state
Watch the video from Lichter linked on the page.
My second favorite would be using KV Cache in your Nitro layer, depending on your environment.
https://www.youtube.com/watch?v=KN5e2Hh6uC0
3 replies
Is it possible to use a custom icon in NuxtUI "<UIcon />"?
I'm using this way in nuxt.config (referencing svgs)
Then use
context: https://github.com/nuxt/icon?tab=readme-ov-file#custom-local-collections
4 replies
Nitro scheduledTask cloudflare
I don't know for sure this is supported yet on Cloudflare Pages without somehow building in Cron Triggers in a worker.
Looks like the workers preset is required when deploying. Some context: https://nitro.unjs.io/guide/tasks#platform-support
I'd image your best bet for now is to build in a Worker schedule to call Nitro.
2 replies