Photo by Kin Li on Unsplash

In this article, I’ll be sharing how to add copy to clipboard functionality in your react app without the hassle of installing a library into your app. 😌

So we need to 3 things: ♻️

01: A button : you can take a div or copy icon, anything you would like.

02: An onClick Handler function: Well, I am using an anonymous arrow function here for the same, but we can have a separate function created for that.

03: Variable / State Variable (Depends upon your type of data) : To store the text which will be copied !

Photo by Federico Beccari on Unsplash

Hey! You may have been asked this question in an interview or maybe not. Whatever the case is, it doesn’t hurt to always know more. So here I’ll be sharing how to create polyfill for the map, filter, and reduce array methods.

Let’s Code !

Pollyfill for

Let’s first see how works from its syntax:

So, the original function takes a callback function as an argument and that callback function can have three arguments passed into it :
a. current value
b. index of the…

Well! Nobody likes a lot of chit-chat before coming to the real thing especially when it comes to the job, so here I’ll be sharing the 10 most common questions that you’ll get in your interview on ReactJS.

I won’t share the answers because it is good to search and understand on your own if you don’t know any.


Q1: What is state and the difference between state and props ?

Q2: What is JSX ? How browser reads it ?

Q3: What are react hooks ?

Q4: What are Pure Components and when should we…

What is an Array ?

An array is a data structure, which can store a collection of elements of the same data type and has a fixed-size.

We heard it already, right ? Let’s take an example for better understanding.

Consider you have some toy balls of different colours (pink, green, blue, yellow …you name it).

And I ask you to collect all the blue balls and store them in a box which can only hold 7 balls.

Photo by Tianyi Ma on Unsplash

In this tutorial, I am going to explain how to deploy an app on Firebase.
So, if do not have a clear idea on what Firebase is ? I would suggest going through the below link.

Step 01: Create an account on Firebase

Go to

Photo by John Cameron on Unsplash

In this tutorial, I will share how I created a Coronavirus Tracker using react.js and amcharts library.


Before moving on to the tutorial, I expect you have sound knowledge of the three basic pillars of Web Development — HTML, CSS, JAVASCRIPT as well as REACT.JS Rest you’ll learn on the go 😉.

Step 01: Planning

We will develop a SPA (Single Page Application), which will show a world heat map in which we can hover over the countries to see the relative data for that particular country and make it universally accessed by everyone through a public URL.

We will use :

In JavaScript, you must have heard of the term Lexical Environment several times.

So what is this Lexical Environment ?

Lexical Environment” is basically a specification object, which stores the association of identifiers to their functions and variables.

Every variable, function, and code block has its own Lexical Environment.

Consider Lexical environment into two parts:
1. Environment: This stores all the local variables and value of this.
2. Reference: A reference to the outer environment in which it was created.

Let’s study them further for variables and functions in more detail.

Case A: Variable

In the image below, the comments explain the Lexical…

Tanya Singh

Software Engineer | (Java & JavaScript) | Lives in India |

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