Rank 2: Process
do i have to use User Preference,
Votes
0
Replies
7
Participants
Unknown
Messages
8
Rank 2: Process
do i have to use User Preference,
If its just small amount of information, then yes use the User Preference.
But the User Preference has limit of 64KB for the total size, so if it bigger then that creating anouthr collection would be the best
Rank 2: Process
yes its a small amount of data like three or four field with 50 words each
So User Preference well suit you
Rank 2: Process
as i go through doc but not found how to implement.
To get the preference
https://appwrite.io/docs/client/account?sdk=web-default#accountGetPrefs
To update
https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePrefs
So you would do something like this
const prefs = await account.getPrefs();
prefs['phone'] = '1234';
await account.updatePrefs(prefs);Rank 2: Process
but how to create while sign up
For that create a function the listen to the event of user creation and then do something like this
users.updatePrefs('[USER_ID]', {});