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
- 1.9.5 Migration problem
1.9.5 migration problem after run migration command only openruntimes-executor
- Appwrite Sites deployment fails because ...
Appwrite Cloud Sites deployments are failing consistently for both GitHub and manual deployments. The build command completes successfully and packaging also c...
- Build succeeds but deployment fails — si...
My Next.js 15.5.20 site (standalone output mode) builds successfully on Appwrite Sites, but the deployment fails at the final packaging step with: [sidecar:bui...