Skip to content

Commit

Permalink
Examples for actionCreators option
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Aug 1, 2016
1 parent 12e4fe2 commit 477e69d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/counter/store/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';

This comment has been minimized.

Copy link
@SameMitchellNeal
import invariant from 'redux-immutable-state-invariant';
import reducer from '../reducers';
import * as actionCreators from '../actions/counter';

export let isMonitorAction;
export default function configureStore(initialState) {
const store = createStore(reducer, initialState, compose(
applyMiddleware(invariant(), thunk),
window.devToolsExtension ? window.devToolsExtension({
getMonitor: (monitor) => { isMonitorAction = monitor.isMonitorAction; }
getMonitor: (monitor) => { isMonitorAction = monitor.isMonitorAction; },
actionCreators
}) : f => f
));

Expand Down
3 changes: 2 additions & 1 deletion examples/todomvc/store/configureStore.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createStore } from 'redux';
import rootReducer from '../reducers';
import * as actionCreators from '../actions/todos';

export default function configureStore(initialState) {
const store = createStore(rootReducer, initialState,
window.devToolsExtension ? window.devToolsExtension() : undefined
window.devToolsExtension && window.devToolsExtension({ actionCreators })
);

if (module.hot) {
Expand Down

3 comments on commit 477e69d

@brian-gavin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this functionality actually exist in the API?

I'm citing here:
https://github.com/zalmoxisus/redux-devtools-extension/blob/master/src/app/api/index.js#L248

To me, this seems like actionCreators when using the direct messaging API isn't implemented.

@aspiers
Copy link

@aspiers aspiers commented on 477e69d Apr 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get this working - see ctrlplusb/easy-peasy#467

@Be1newinner
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have multiple actions to be tested through dev tools, but everytime i have to copy paste the payload in extension in custom action dispatch tab,
is there a way to pass some default payload in store => devtools => action creator option
so i can just hit dispatch button of devtools extension

Please sign in to comment.