@hiro-graph/redux
Redux awareness for the `@hiro-graph/orm` package
Last updated 25 days ago by vteremasov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hiro-graph/redux 
SYNC missed versions from official npm registry.

@hiro-graph/redux: Graph ORM redux middleware

This is middleware/reducer combo, a custom Token, an action creator and some actions for redux that wraps the Graph ORM (@hiro-graph/orm).

installation

$ npm install @hiro-graph/redux

Documentation

Please see ./docs

Example

import HiroGraphORM from "@hiro-graph/orm";
import schema from "path/to/schema/mappings";

import {
    createAction,
    createStoreEnhancer,
    graphReducer,
    createToken
} from "@hiro-graph/redux";

import { createStore, combineReducers } from "redux";

const endpoint = "http://graph:8888";
// `createToken` instantiates a new token handler for the
// redux application.
const token = createToken();
const orm = new HiroGraphORM({ endpoint, token }, schema);

const reducers = combineReducers(reducers, reducer);

//createStore from redux
const store = createStore(
    createReducer(token),
    initialState,
    createStoreEnhancer(orm)
);

//make an action creator.
const myAction = createAction(({ orm, dispatch }, ...args) => {
    return orm.findById(args).then(nodes => {
        //do something with nodes.
        //dispatch(something else)?
    });
});

store.dispatch(actionCreator("id", "id2"));

Current Tags

  • 6.1.4                                ...           hiro-6.x (2 months ago)
  • 7.3.6                                ...           latest (25 days ago)

88 Versions

  • 7.3.6                                ...           25 days ago
  • 6.1.4                                ...           2 months ago
  • 6.1.3                                ...           2 months ago
  • 7.3.5                                ...           3 months ago
  • 7.3.3                                ...           3 months ago
  • 7.3.4                                ...           4 months ago
  • 7.3.2                                ...           4 months ago
  • 7.3.1                                ...           4 months ago
  • 7.3.0                                ...           4 months ago
  • 7.2.10                                ...           4 months ago
  • 7.2.9                                ...           4 months ago
  • 7.2.8                                ...           4 months ago
  • 7.2.7                                ...           4 months ago
  • 7.2.6                                ...           4 months ago
  • 7.2.5 [deprecated]           ...           4 months ago
  • 7.2.4 [deprecated]           ...           4 months ago
  • 7.2.3 [deprecated]           ...           4 months ago
  • 6.1.2                                ...           5 months ago
  • 6.1.1 [deprecated]           ...           5 months ago
  • 7.2.2 [deprecated]           ...           5 months ago
  • 6.1.0 [deprecated]           ...           5 months ago
  • 6.0.30 [deprecated]           ...           6 months ago
  • 6.0.29 [deprecated]           ...           6 months ago
  • 6.0.28 [deprecated]           ...           6 months ago
  • 7.2.1 [deprecated]           ...           7 months ago
  • 7.2.0 [deprecated]           ...           7 months ago
  • 7.1.1 [deprecated]           ...           8 months ago
  • 7.1.0 [deprecated]           ...           8 months ago
  • 7.0.12 [deprecated]           ...           8 months ago
  • 7.0.11 [deprecated]           ...           8 months ago
  • 7.0.10 [deprecated]           ...           8 months ago
  • 6.0.26 [deprecated]           ...           9 months ago
  • 6.0.25 [deprecated]           ...           10 months ago
  • 7.0.9 [deprecated]           ...           10 months ago
  • 6.0.24 [deprecated]           ...           10 months ago
  • 6.0.23 [deprecated]           ...           10 months ago
  • 6.0.22 [deprecated]           ...           10 months ago
  • 6.0.21 [deprecated]           ...           10 months ago
  • 6.0.20 [deprecated]           ...           10 months ago
  • 6.0.19 [deprecated]           ...           10 months ago
  • 6.0.18 [deprecated]           ...           10 months ago
  • 6.0.17 [deprecated]           ...           10 months ago
  • 6.0.16 [deprecated]           ...           10 months ago
  • 6.0.15 [deprecated]           ...           a year ago
  • 7.0.8 [deprecated]           ...           a year ago
  • 6.0.14 [deprecated]           ...           a year ago
  • 6.0.13 [deprecated]           ...           a year ago
  • 6.0.12 [deprecated]           ...           a year ago
  • 6.0.11 [deprecated]           ...           a year ago
  • 6.0.10 [deprecated]           ...           a year ago
  • 6.0.9 [deprecated]           ...           a year ago
  • 6.0.8 [deprecated]           ...           a year ago
  • 6.0.7 [deprecated]           ...           a year ago
  • 6.0.6 [deprecated]           ...           a year ago
  • 7.0.7 [deprecated]           ...           a year ago
  • 6.0.5 [deprecated]           ...           a year ago
  • 6.0.4 [deprecated]           ...           a year ago
  • 7.0.6 [deprecated]           ...           a year ago
  • 6.0.3 [deprecated]           ...           a year ago
  • 7.0.5 [deprecated]           ...           a year ago
  • 6.0.2 [deprecated]           ...           a year ago
  • 7.0.4 [deprecated]           ...           a year ago
  • 7.0.3 [deprecated]           ...           a year ago
  • 7.0.2 [deprecated]           ...           a year ago
  • 7.0.1 [deprecated]           ...           a year ago
  • 6.0.1 [deprecated]           ...           a year ago
  • 7.0.0 [deprecated]           ...           a year ago
  • 6.0.0 [deprecated]           ...           a year ago
  • 1.2.1 [deprecated]           ...           a year ago
  • 1.2.0 [deprecated]           ...           a year ago
  • 1.1.19 [deprecated]           ...           a year ago
  • 1.1.18 [deprecated]           ...           a year ago
  • 1.1.17 [deprecated]           ...           a year ago
  • 1.1.16 [deprecated]           ...           a year ago
  • 1.1.15 [deprecated]           ...           a year ago
  • 1.1.14 [deprecated]           ...           a year ago
  • 1.1.13 [deprecated]           ...           a year ago
  • 1.1.11 [deprecated]           ...           a year ago
  • 1.1.10 [deprecated]           ...           a year ago
  • 1.1.9 [deprecated]           ...           a year ago
  • 1.1.8 [deprecated]           ...           a year ago
  • 1.1.7 [deprecated]           ...           a year ago
  • 1.1.6 [deprecated]           ...           a year ago
  • 1.1.5 [deprecated]           ...           a year ago
  • 1.1.4 [deprecated]           ...           a year ago
  • 1.1.3 [deprecated]           ...           a year ago
  • 1.1.2 [deprecated]           ...           a year ago
  • 1.1.1 [deprecated]           ...           a year ago
Downloads
Today 0
This Week 89
This Month 105
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |