Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

v0.2.0

Compare
Choose a tag to compare
@old-fusion-bot old-fusion-bot released this 07 Nov 22:24
af94af7

Changelog

Highlighted Changes

  • Update api of withRPCRedux and withRPCReactor (#4)

Other Changes

  • Add initial implementation (#2)

Migration Guide

Remove createRPCReactor export

-import {createRPCReactor} from 'fusion-plugin-rpc-redux-react';

Update withRPCReactor api

-import {createRPCReactor} from 'fusion-plugin-rpc-redux-react';
-const withIncrement = withRPCReactor({
-  ...createRPCReactor('rpcId', {
-    start: (state, action) => newState,
-    success: (state, action) => newState,
-    failure: (state, action) => newState,
-  }),
-  propName: '',
-  mapStateToParams: (state) => {},
-  transformParams: (params) => {},
-});
+const withIncrement = withRPCReactor('rpcId', {
+  start: (state, action) => newState,
+  success: (state, action) => newState,
+  failure: (state, action) => newState,
+}, {
+  propName: '',
+  mapStateToParams: (state) => {},
+  transformParams: (params) => {},
+})

Update withRPCRedux api

-const withIncrement = withRPCRedux({
-  rpcId: 'increment',
-  propName: '',
-  mapStateToParams: (state) => {},
-  transformParams: (params) => {},
-});
+const withIncrement = withRPCRedux('increment', {
+  propName: '',
+  mapStateToParams: (state) => {},
+  transformParams: (params) => {},
+});