When adding an eventListener in JavaScript, the first parameter is a type.
A case-sensitive string representing the event type to listen for.
I understand the intention to keep this approach for redux action or vuex mutation. But the risks of typos are real and difficult to debug. That's why I prefer the "constant" approach and collocalizing the constant is an excellent practice I hadn't thought of.
Thank you for this article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When adding an eventListener in JavaScript, the first parameter is a
type
.I understand the intention to keep this approach for redux action or vuex mutation. But the risks of typos are real and difficult to debug. That's why I prefer the "constant" approach and collocalizing the constant is an excellent practice I hadn't thought of.
Thank you for this article.