Decorators are used to modify classes and its members (methods, properties).
The question may be, why do we need decorators to change those things? Why not directly change in the declarations?
Directly changing is not scalable. If you need the same changes in 100 classes, you have to write it 100 times. Using decorators, you write it once and apply it as many times as you want.
Decorators give you a central point of change which easier to work with. Frameworks like
Angular use decorators extensively.
In TypeScript, you can decorate the following things:
Decorators are a TypeScript feature…
Mechanical keyboards are fantastic. It’s one of the few ideas that were replaced by worse alternatives. Lightweight webpages have been replaced by bloated junks, fast desktop apps have been replaced by chromium wrappers made with electron. Awesome mechanical keyboards have been replaced by subpar rubber dome keyboards. Good thing is, mechanical keyboards are gradually making a comeback. There are more and more enthusiasts out there. Me being one of them.
Enough with the prelude! Tell me what should I consider while buying a mechanical keyboard.
I’m glad you asked. While buying a mechanical keyboard, there are 2 primary things to…
I read on a book that said “When you desperately want something, the universe conspires to make it happen”. This sentence is about perseverance, not desire. Focusing on something for a long time is a reflection of perseverance.
The difference of results between continuous attention and fragmented attention over a period of time is significant. With fragmented attention you will only get a superficial idea of the subject. It takes time for a mind to be submerged into something.
It’s true you can a lot of work without much attention. Logistical tasks such as filling up a form or making…
We will be going through this article with the assumption that you already know how to use Redux. If you don’t, go ahead and learn to use it first. We have to know what Redux does to better understand how it does that.
Let’s first create our reducer function.
Then we are going to create the
createStore function which takes the reducer function as an argument and returns three methods. Namely,
dispatch , and
subscribe. We will also have the unsubscribe feature which is a function returned by the
Now when you call
The most important benefit unit testing gave me is being able to make changes without fearing things might blow up due to even a small change. The whole process of Software development is dealing with complexity where each new step creates a brand new tangle in the already existing fuck sandwich of a stack.
For smaller projects, you may get away okay without writing unit tests. But in a decent sized project with more than one developer involved, it’s a must if you want to keep your sanity intact.
As engineers, all we do is making things that reduce human…