https://github.com/caseywebdev/pave
Paving the way to better state management.
https://github.com/caseywebdev/pave
Last synced: about 1 year ago
JSON representation
Paving the way to better state management.
- Host: GitHub
- URL: https://github.com/caseywebdev/pave
- Owner: caseywebdev
- License: mit
- Created: 2016-02-16T01:18:41.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T16:53:57.000Z (over 1 year ago)
- Last Synced: 2025-03-27T16:40:52.120Z (over 1 year ago)
- Language: JavaScript
- Size: 568 KB
- Stars: 12
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Pave
Paving the way to better state management.
## Why?
Pave is a data layer inspired by [Relay], [GraphQL], [Falcor] and [Om (next)].
Pave attempts to take the best pieces of each (subjectively) and expose a simple
API that makes managing app state much easier.
## Goals
- **Performance**
The core of any data layer will have many hot paths and should run
efficiently.
- **Flexible Schema**
There is no requirement that your data is strictly typed,
but you can add constraints on inputs and outputs as you see fit.
- **POJO**
All data is represented as JSON-friendly Plain Ol' JavaScript
Objects so there is no need to worry about how to serialize `X` and how to
deserialize `Y`. There are no classes in Pave.
- **Multiple Remotes**
Create a client side schema to use Pave with an existing REST API, implement a
Pave schema on the server or mix and match. Allowing multiple remotes both on
the client and server makes integrating Pave into an existing project
manageable.
- **Immutable**
The cache accepts updates without mutating previous states. This makes
history tracking trivial and prohibits unexpected mutations.
- **Small**
pave
[](https://packagephobia.com/result?p=pave)
graphql
[](https://packagephobia.com/result?p=graphql)
falcor
[](https://packagephobia.com/result?p=falcor)
react-relay
[](https://packagephobia.com/result?p=react-relay)
@apollo/client
[](https://packagephobia.com/result?p=@apollo/client)
## Install
```bash
npm install pave
```
[Falcor]: https://github.com/netflix/falcor
[GraphQL]: https://github.com/facebook/graphql
[Om (next)]: https://github.com/omcljs/om
[Relay]: https://github.com/facebook/relay