Support for custom ID with new documents / offline support
myktra opened this issue · comments
Michael Trachtman commented
Is it possible to enhance the add(data)
function returned by the useCollection
hook to allow the client/caller to supply their own sufficiently unique/predictable ID for new documents, for example via the nanoid library? Currently this implementation seems to require standard Firestore library/server-generated IDs.
swr-firestore/src/hooks/use-swr-collection.ts
Line 500 in 6884464
Ultimately looking for offline support for new documents as noted in issue #56 and PR #55. This would be a killer feature!!!