Questions tagged as 'dry'

1
answer

How to avoid repetition when listening for changes in properties of a component?

When I need to react to changes in N properties for the same callback I give myself to use something like this: watch: { propriedadeA(){ this.reagir(); }, propriedadeB(){ this.reagir(); }, propriedadeC(){...
asked by 13.09.2017 / 12:53
1
answer

Improved javascript in Dat.GUI

Hello. I created a simple block, using CSS variables . And to "set" these variables to test criteria, I'm using Dat.GUI . The current code is on this Pen . My question is how to improve this code, but specifically on lines 33-50 (the...
asked by 13.06.2017 / 18:26
1
answer

How to repeat content on several static pages?

The question is as follows, I have only .HTML static files and am looking for a simple way to create the blocks only once using only the client side . The idea is to respect DRY, is there any way to do this directly with JavaScript or jQuery...
asked by 19.01.2017 / 13:37