cloudinary-community / next-cloudinary

⚡️ High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.
https://next.cloudinary.dev
MIT License
237 stars 64 forks source link

Feedback for “CldUploadWidget Examples” #472

Closed AbhinasRegmi closed 2 months ago

AbhinasRegmi commented 2 months ago

What is setResouce where does it come from?.

There is no imports given in the example code.

https://next.cloudinary.dev/clduploadwidget/examples

colbyfayock commented 2 months ago

hey @AbhinasRegmi nice catch, setResource in this context is from a useState instance where this is the code I'm using to show the demo example there, but without that context, it's a bit confusing. i'll get this fixed and updated to make it more clear, probably keeping it, but adding useState to show the example of how to make it work

colbyfayock commented 2 months ago

pushed an update to include a useState line to hopefully improve clarity

https://next.cloudinary.dev/clduploadwidget/examples