supabase-cache-helpers
supabase-cache-helpers copied to clipboard
useDirectory and useDirectoryFileUrls use same key
Describe the bug
I have a parent that I'm using useDirectoryFileUrls to show images in a folder in and then the child is using useDirectory to check for existance of the folder, but when I do so the url gets wiped on the parent and clears the image.
To Reproduce
Make a parent that uses useDirectoryFileUrls with a child that uses useDirectory with the same folder.
Expected behavior The different methods should have different keys.
Additional context If there's a better way to conditionally remove a directory (I'm trying to clear the directory to replace the files in it in the child) that would suffice.
can you share a snippet of what you want to achieve? Do you want to use the mutation hooks provide by the library to clear it?
Crap I don't remember, we've been moving so fast. I'll try to dig in and find the example.
Looked through our codebase and we're not using useDirectory any more so I replaced it with a new pattern we can close it and I'll reopen if I can create a gist or something that shows the issue.