0.0.24 • Published 3 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
3 years ago
0.0.21
3 years ago
0.0.22
3 years ago
0.0.23
3 years ago
0.0.24
3 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.17
4 years ago
0.0.16
4 years ago
0.0.15
4 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago