JavaScript Prototypes in Plain English

*Cover Image by Jozef Mikulcik from Pixabay * One of the concepts in JavaScript that beginners find hard to wrap their heads around is prototypes, especially for Programmers coming from a class-based programming language. You might ask “Doesn’t modern JavaScript have the class keyword?” Yes, it does, but it’s just ‘sugar’ over prototypes, and understanding how prototypes work can save you a lot of stress when debugging JavaScript code. JavaScript is weird but understanding it makes it less weird in my opinion (if you trust that my opinion matters :) ) ...

October 22, 2021

Avoiding Prop Drilling in React Without Context API or Redux

Prop Drilling is the process by which you pass data from one part of the React Component tree to another by going through other parts that do not need the data but only help in passing it around. Imagine someone living in Lagos, Nigeria placing an order on Amazon for a package. The package will have to go through many hands - it has to be flown by air to Nigeria, transported to the Lagos, moved from place to place until it gets into the hands of the buyer. At each stage, Amazon employs the services of people that do not ‘care’ about the product, they only help to ‘pass’ it to the person who really cared - the buyer. ...

August 8, 2020