
Hi this may sound super stupid or maybe im doing it wrong cause im kinda new but this doesnt work from me:
import { ID } from 'appwrite';
async function rentarCasaOnetime() { console.log(ID.unique()) }
The console.log returns:
unique() like if it was a string or something but it doesnt execute the function
it returns without the autogen id what is happening?

I also wonder about it, but actually the function just returns a string and the AppWrite engine creating the ID on the machine and not on your end

The actual functions that creates the random ID is part of the Utopia
PHP framework which is maintained also by AppWrite,
You can see the code here https://github.com/utopia-php/database/blob/main/src/Database/Helpers/ID.php

thanks, and is there any way i could return a string from the client side?

You can just generate a UUID using any of the JS client libraries

A popular option is: https://www.npmjs.com/package/uuid

alright thanks !
Recommended threads
- Problems following https://appwrite.io/b...
To me it is unclear what the author means when he writes "Please note that the Appwrite instance should be shut down". I am using docker. What exactly am I supp...
- SDK mismatch
Hi there, The following warning is currently appearing in my console: ``` Warning: The current SDK is built for Appwrite 1.8.0. However, the current Appwrite...
- Can't read files from s3 storage directl...
I try to download the files stored by appwrite directly from my S3 provider. The bucket is not encrypted and no gzip but the files seem not to be stored there i...
