Defining a property named 'actions' on an element overrides the redux actions and results in a 'action does not exist on ' error message. This should be documented as it could cause confusion.
Reproduction:
new Polymer({
is: 'polymer-element',
behaviors: [
Redux.ReduxBehavior
],
actions: {
setLoading: function(loading) {
return {
type: 'LOADING',
loading: loading
};
},
},
properties: {
actions: {
type: Object,
value: null
}
},
_onSendTap: function() {
this.dispatch('setLoading', true); // Returns error action 'setLoading' is not defined
}
});
Thanks. I will look into this, there might be a way to get the actions of the instance before polymer sets them as properties. If not documentation will suffice.
Defining a property named 'actions' on an element overrides the redux actions and results in a 'action does not exist on' error message. This should be documented as it could cause confusion.
Reproduction: