How to use generateId
in syncedCrud
?
#376
Unanswered
igor-zmitrovich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I want to be able to add the elements to the observable, which will be persisted locally and synchronized with the backend.
I want to add the new element without ID, and let the
generateId
handle the rest, however I don't know how to do that and I was not able to find anything in DocsI am using
syncedCrud
as follows:Documentation says there is an option -
generateId
.However I am not sure how to add the objects without IDs? There is no example in the documentation, and the only way I was able to add the element is like this:
But to add to the
<Record<str, {...}>
i need to have ID 🤷Maybe I am doing something it wrong?
Beta Was this translation helpful? Give feedback.
All reactions