autoaction icon indicating copy to clipboard operation
autoaction copied to clipboard

Autoactions with args as a function of props & state fail to work when autoaction is defined as an object

Open gcazaciuc opened this issue 8 years ago • 0 comments

When defining a decorator in the form:

const actionCreators = {
     load: loadSpy
};

const autoActions = {
            load: {
                args: (state, props) => "xyz",
                key: (state, props) => "xyz"
            }
 };
const decorator = autoaction(autoActions, actionCreators);
    It fails to work(throwwing an exception) properly because of the fact the check for args being a function is incorrectly made within the autoaction lib. A folllow up PR fixing this will follow shortly.

gcazaciuc avatar Jun 12 '16 14:06 gcazaciuc