autoaction
autoaction copied to clipboard
Autoactions with args as a function of props & state fail to work when autoaction is defined as an object
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.