Hello, ESLint is flagging my code for assigning the user object (returned from account.get()
) to a react state which is initially defined with the value "null"
const [user, setUser] = useState(null)
How do I fix this error?
should your useState be typed? useState<Models.User<Models.Preferences>>();
Sure but where do I find the correct types for Appwrite stuff
Like how do I import the types they use
Might be like this: import { type Models } from 'appwrite';
@larkx
You import Models from appwrite
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...