There is something common that sometimes we all do. Wrap dom elements in custom components <CustomComponet id=”abc” title=”abc” nonDomProp=”abc” …andsoforth /> Custom component in this example wraps button which has the properties id and title but not nonDomProp so I get a warning which makes sense because nonDomProp doesn’t exist in the wrapped button DOM element and I am just
Tag: spread
Spread Operator – TypeScript
I’m trying to pass an array as an argument with Spread operator but something is going wrong. Answer For TypeScript to correctly predict what argument types are going to spread into the parameter, you will have to change the args variable type into a tuple as follows:
Better way to write spread operator with conditions in javascript
I’m looking for a better way to write the following code: fromCreatedAt and toCreatedAt are variables that can change and generate a different object. This is just an example, but you could have an object that repeats the conditions of the createdAt field multiple times for other fields, so you would find a way to refactor that repeated functionality. Answer