Skip to content

Commit

Permalink
feat(api): add actionCreators option to messaging api (#529)
Browse files Browse the repository at this point in the history
Add actionCreators option handling to
__DEV_TOOLS_EXTENSION__.connect([options])

Fixes #526
  • Loading branch information
brian-gavin authored and jhen0409 committed Jul 4, 2018
1 parent dc39a63 commit 0f5bac0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/api/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import jsan from 'jsan';
import throttle from 'lodash/throttle';
import seralizeImmutable from 'remotedev-serialize/immutable/serialize';
import { getActionsArray } from 'remotedev-utils';
import { getLocalFilter, isFiltered } from './filters';
import importState from './importState';
import generateId from './generateInstanceId';
Expand Down Expand Up @@ -148,6 +149,7 @@ export function connect(preConfig) {
if (!config.instanceId) config.instanceId = id;
if (!config.name) config.name = document.title && id === 1 ? document.title : `Instance ${id}`;
if (config.serialize) config.serialize = getSeralizeParameter(config);
const actionCreators = config.actionCreators || {};
const latency = config.latency;
const predicate = config.predicate;
const localFilter = getLocalFilter(config);
Expand Down Expand Up @@ -240,12 +242,12 @@ export function connect(preConfig) {
if (liftedData.isPaused) isPaused = true;
}
message.libConfig = {
actionCreators: JSON.stringify(getActionsArray(actionCreators)),
name: config.name || document.title,
features: config.features,
serialize: !!config.serialize,
type: config.type
};
// TODO: add actionCreators
}
post(message);
};
Expand Down

0 comments on commit 0f5bac0

Please sign in to comment.