State management Dilemma
Unanswered
Indian oil sardine posted this in #help-forum
Indian oil sardineOP
im trying to achieve this flow
im using *appwrite *as my baas but im going manual and using the database to store my auth creds
im looking for a better state management for user state and notes state management than react's useContext (it's just bad, takes too much time ~1.2-1.3s to get that state with api). Im using nextjs
i want to like fetch the user once and save it some sort of state if that's possible, im a junior dev so feel free to share your thoughts
Subject collection
name string
courseId string
semester integer
notes string []
acronym string
Users collection
userId string
name string
password string
prnNo string
role enum
createdAt datetime
teacherSem integer []
uploadedNotes string []
usersAdded string []
usersRemoved string []
email string
sessionToken string
lastLogin datetime
resetToken string
resetTokenExpiry datetime
Notes collection
noteId string
users relationship with users
sem integer
uploadDate datetime
fileUrl url
subject relationship with subject
Im thinking of using zustand + reactQuery
im using *appwrite *as my baas but im going manual and using the database to store my auth creds
im looking for a better state management for user state and notes state management than react's useContext (it's just bad, takes too much time ~1.2-1.3s to get that state with api). Im using nextjs
i want to like fetch the user once and save it some sort of state if that's possible, im a junior dev so feel free to share your thoughts
my db structure
Subject collection
name string
courseId string
semester integer
notes string []
acronym string
Users collection
userId string
name string
password string
prnNo string
role enum
createdAt datetime
teacherSem integer []
uploadedNotes string []
usersAdded string []
usersRemoved string []
email string
sessionToken string
lastLogin datetime
resetToken string
resetTokenExpiry datetime
Notes collection
noteId string
users relationship with users
sem integer
uploadDate datetime
fileUrl url
subject relationship with subject
Im thinking of using zustand + reactQuery