0.0.24 • Published 4 years ago
redux-jarm v0.0.24
redux-jarm
Offline-first redux ORM designed around JSONAPI servers.
API specification
Check out the full API Specification.
Additional resources:
Requirements
Jarm requires you to be using redux
and redux-thunk
in your middleware.
Installation
Install the package with yarn / npm:
yarn add redux-jarm
# npm install redux-jarm
Instantiate a Jarm object with your config:
import { createJarm } from 'redux-jarm'
const Jarm = createJarm({
baseUrl: 'https://example.com/api'
storeKey: 'models',
schema: {
User: {
url: '/users/',
},
},
})
Register Jarm in your store's reducer:
import { createStore, combineReducers, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import Jarm from './jarm.js'
const reducer = combineReducers({
models: Jarm.reducer,
})
const store = createStore(reducer, applyMiddleware(thunk))
Optionally, you can persist your Jarm state as documented here.
0.0.20
4 years ago
0.0.21
4 years ago
0.0.22
4 years ago
0.0.23
4 years ago
0.0.24
4 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago