gvergnaud/lenstore — explained in plain English
Analysis updated 2026-07-18 · repo last pushed 2016-02-29
Read a deeply nested piece of app state, like a user's username, without writing conditional checks.
Update one field in a nested state object, like a user's age, without manually deep-copying the rest.
Subscribe a UI component to a specific piece of state so it automatically re-renders when that data changes.
Replace repetitive Redux or MobX-style state update code with a simpler lens-based path syntax.
| gvergnaud/lenstore | 3rd-eden/ircb.io | a15n/a15n | |
|---|---|---|---|
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2016-02-29 | 2016-11-16 | 2019-04-07 |
| Maintenance | Dormant | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 3/5 | 2/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Still in active development, some planned features like multi-store combination and middleware are not yet built.
LenStore is a work-in-progress state management library for JavaScript that lets you read and update application state in a clean, composable way. Instead of writing complex logic to navigate through nested objects, you describe a "path" to the data you want, and the library handles the details of getting, modifying, or setting values safely. Think of it like having a precise tool to point at any piece of your app's data. If your app tracks a user's profile inside a larger state object, you can say "give me the user's username" or "update the user's age to 23" without writing conditional checks or spread operators. The library returns an Observable, something that notifies listeners whenever that data changes, so your UI automatically re-renders when state updates. It's similar to how Redux or MobX work, but with a different mental model. Under the hood, the library uses a concept called lenses (a functional programming pattern) to create safe, composable paths through your data. A lens is like a combination of a getter and a setter for a specific location in your state tree. When you write view(L.user.username) or set(L.user.username, 'newName'), the library is using these lenses to access or modify that one piece of data while keeping the rest intact. The syntax is deliberately simple, it reads almost like accessing properties on a plain JavaScript object. This would appeal to developers building interactive web apps who find themselves writing repetitive state update code. Instead of manually deep-copying objects and updating nested fields, you describe the shape of your state once and get helper functions to work with any part of it. The project is still in active development, the README shows several planned features like combining multiple stores, middleware hooks, and special lens types for advanced patterns like references and atoms, but the core idea of a lens-based state store is already functional and ready to experiment with.
LenStore is a work-in-progress JavaScript state management library that lets you read and update nested app state using composable "lens" paths instead of manual deep-copying and conditional checks.
Mainly JavaScript. The stack also includes JavaScript.
Dormant — no commits in 2+ years (last push 2016-02-29).
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.