New answers tagged

1 vote

are magic strings as event names okay

There is nothing wrong with having string event name like "click". It is not any more magic than the method name onClick. The aversion towards strings is a bit of cargo-cult imported from ...
JacquesB's user avatar
  • 57.7k
2 votes

are magic strings as event names okay

There is a simple test: If you misspell it, is there some mechanism that tells you, or do things just mysteriously not work? If something tells you visibly that you got it wrong then you are fine.
gnasher729's user avatar
  • 43.4k
1 vote

Using JS and CSS parent selector to replace media queries: is it a good practice?

I do think you have something very valuable in your hands. The idea to have CSS to handle state having as base HTML properties is very useful, and if combined with accessibility, it can help you both ...
Bernardo Benini Fantin's user avatar
1 vote

flow control solutions in Node.js - use async.waterfall?

pipe of async functions can be done in a really clean way: npm install js-awe This is how the solution of your problem looks like: import {plan, repeat} from 'js-awe' const createCollection = plan()....
Jose Marin's user avatar

Top 50 recent answers are included