@phenyl/redux
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

@phenyl/redux

State synchronization among Phenyl CentralState(server) and LocalState(client) using Redux.

usage

Apply phenyl middleware to redux middleware. PhenylHttpClient instance is required to create phenyl middleware for synchronization with CentralState(server).

import { createMiddleware, reducer } from "@phenyl/redux";
import { createStore, applyMiddleware } from "redux";
import PhenylHttpClient from "@phenyl/http-client";

const httpClient = new PhenylHttpClient({ url: "localhost:8080" });
const middleware = createMiddleware({ client: httpClient });
const enhancer = applyMiddleware(middleware);
const store = createStore(reducer, enhancer);

Installation

npm install @phenyl/redux

Readme

Keywords

none

Package Sidebar

Install

npm i @phenyl/redux

Weekly Downloads

169

Version

4.1.0

License

Apache-2.0

Unpacked Size

89 kB

Total Files

19

Last publish

Collaborators

  • shinout
  • naturalclar
  • sasurau4
  • wh1tecat
  • bowzstandard
  • alternacrow
  • camcam-lemon
  • 1natsu