20 full stack JS questions that may be relevant on your next interview :)
A bit more context: Before ES6 there were only one way of defining your variables: with the var keyword. If you did not define them, they would be assigned to the global object. Unless you were in strict mode, then you would get an error if your variables were undefined. Also scope was only defined within a block. Anything outside was considered global scope. ES6 Introduced function scope so var took a different context:
This article is designed to clarify some confusion around async/await usage and how it works compared to a regular Promise.
Ah the much loved call back hell. Since JS8 or ECMAScript 2017 (ECMAScript is just a standard set by ECMA organization), using promises became a lot more practical due to these two magic keywords async and await. I won’t go into detail on callbacks as it is its own topic.
Before diving in it is important to know the difference between object oriented programming (OOP) and functional programming (FP). They both have their pros and cons depending on the use case. Typically for building complex systems that have well defined predetermined structure OOP is the way to go as it allows for a more efficient use of resources. However for a single page react application for example with a few components and maybe a few apis functional programming, will probably be quicker and easier to dive right in. …
I want to start by thanking the react team for making functional programming fun again :) Long gone are the days where you need a state management platform to go along with your react app (at least for single page applications). For more complex scenarios (e.g showing notifications for different routes/pages REDUX comes in handy) In this article i would like to walk through a few examples that helped me go a little bit beyond the basics in understanding hooks.
We will focus on these three hooks and how to combine them to build a state management platform in react…