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.
Is it possible to enhance the
add(data)
function returned by theuseCollection
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.https://github.com/nandorojo/swr-firestore/blob/68844645137dd009b3d8e15d69a85e009bfe3f45/src/hooks/use-swr-collection.ts#L500
Ultimately looking for offline support for new documents as noted in issue #56 and PR #55. This would be a killer feature!!!