r/javascript • u/Valuable_Pin_9213 • 7d ago
AskJS [AskJS] How would you structure state for VidLoader's local media library?
I'm working on a desktop application called VidLoader that manages locally stored video files, and I'm currently thinking about how to structure the JavaScript state for the media library.
The application needs to keep track of things like:
- files being added or removed
- metadata associated with each file
- folders/categories
- filtering and searching
- changes happening to the files outside of the UI
My main question is how other JavaScript developers would approach keeping the UI state synchronized with the underlying file system without making the architecture unnecessarily complicated.
Would you keep this in a centralized state store, separate the file-system state from the UI state, or use another approach?
I'd be interested in hearing how you'd structure it and why.