
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
- upgrading from 1.4.5 to 1.6.0 broke my s...
I managed to upgrade my self hosted instance from 1.4.5 to 1.6.0 and now when i try to log into the dashboard i get the error in the attached image. Also any ap...
- Is it possible to getRow with all relati...
With the new Opt-In relationship loading, is it possible to query getRow to get all attributes and relationships and possibly even cascading relationships? I tr...
- TableDB.getRow() response does not conta...
This is for Web/React sdk 20.0.0 The row was created via `TableDB.createRow(...)` and I can see it in the console with the relationships correctly set. In the c...
