This writeup talks about three JavaScript concepts which are commonly referred to as advanced JavaScript concepts but are not only fundamental but also easy to understand: Execution Context, Lexical Environment, and Closure.

First, let’s talk about some basic prerequisites.

JavaScript is a function-oriented language and as such it is very flexible with how functions can be used. In JavaScript the functions are first-class citizens or also called first-class objects. Which simply means that you can store functions in variables, pass them to other functions as arguments, and return them from other functions as values, just like objects.

First-Class Functions
First-Class Functions
First — Class Functions (store in variable or send in argument)

An alternative to the goodness of this.setState()

is every body hooked yet ? Image Credits — Free Code Camp

So, it’s been quite some time since React hooks were released. and from the looks of it, everybody is going gaga over them. Well, i understand. because i’m one of you too. Hooks got me hooked!

Hooks allow us to create smaller, composable, reusable more manageable React components.

Sometimes you may be using hooks to manage the form state, using useState or useReducer.

Now, let’s consider a scenario where you have to manage a complex form state with multiple form inputs, which can be several different types like text, number, date input. The form state may even have nested information…


An alternative to using this.setState()

is every body hooked yet ? Image Credits — Free Code Camp

It’s been a while since React hooks were released, and everyone has fallen in love with them. I understand because I’m one of you too. Hooks got me hooked!

Hooks allow us to create smaller, composable, reusable more manageable React components.

One use case you may be using hooks for is to manage form state using useState or useReducer.

Let’s consider a scenario where you have to manage a complex form state with multiple form inputs, which can be several different types like text, number, date input. The form state may even have nested information such as a user’s address…


an alternative to some goodness of this.setState()

Is everybody hooked yet? Image Credits — Free Code Camp

So, it’s been quite some time since React hooks were released. and from the looks of it, everybody is going gaga over them. Well, I understand. because I'm one of you too. Hooks got me hooked!

Hooks allow us to create smaller, composable, reusable more manageable React components.

sometimes you may be using hooks to manage the form state, using useState or useReducer.

Now, let’s consider a scenario where you have to manage a complex form state with multiple form inputs, which can be several different types like text, number, date input. The…


an alternative to some goodness of this.setState()

is everybody hooked yet ?

So, it’s been quite some time since react hooks were released. and from the looks of it, everybody is going gaga over them. Well, i understand. because i’m one of you too. Hooks got me hooked!

hooks allow us to create smaller, composable, reusable more manageable react components.

sometimes you may be using hooks to manage the form state. using useState or useReducer.

now let’s consider a scenario where you have to manage a complex form state with multiple form inputs and several different types of input. the form state may even have…

Aditya Loshali

I’m a full stack web developer working with Javascript on React and Node.js everyday.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store