You should have a set time to work, a defined workspace, and a daily routine, even though you’re at home

Scrabble tiles forming the words “work from home”
Scrabble tiles forming the words “work from home”
Photo by Nelly Antoniadou on Unsplash

Ever since work from home began, my productivity has had its ups and lows until I found the right way to do it. Since then, it has been at a constant high. During the initial days, all of us must have had mixed feelings. I first thought it would be fun for a while to wake up five minutes before the first meeting and spend all day in pajamas. And I thought avoiding traffic and travel was the best thing that could ever happen to me.

But later on, when burnout kicked me pretty hard, I decided to not let it get to me. I thought it was just me, but later on, when I’d talked to my colleagues who live with their parents or the ones that have kids at home or a noisy neighbor who loves to yell all the time, I realized what the real deal was. Also, being prone to get distracted or to procrastinate has also become extremely common as we are all at home in our own space. We’re the master of our time now as there’s no one around us that we’re scared will judge us. …


Being a Performance Conscious Developer

Image for post
Image for post
Photo by krakenimages on Unsplash

Being a developer, it is essential to worry about the performance of the application that we build. Memory management is one of the major factors that affects the performance of an application. Many a time JavaScript developers tend to not consciously think about memory management because JavaScript automatically allocates memory space when an object is created and collects them later as garbage when they’re not used. These behind the scenes behaviour of garbage collection in JavaScript could cause a lot of confusion. Read further to understand this better.

Memory Life Cycle

There are three steps involved in the memory life cycle of almost all programming…


Clear Cache, JSONView, and more

google chrome logo
google chrome logo
Google Chrome logo

Most of the Web Developers use Chrome for their development. According to Wikipedia about 65% of the world population seem to use Chrome, this is one of the reasons why developers choose Chrome to test an application built by them. So if you’re a developer who uses Chrome a lot, here’s a bunch of Chrome extensions that would make your life a lot easier.

1. Colorzilla

Colorzilla basically provides a color picker widget along with a lot of other features. …


Stay updated with the upcoming features to JavaScript in 2021

Image for post
Image for post
Photo by Ekaterina Shevchenko on Unsplash

Since 2015, JavaScript has been receiving constant yearly updates with new features being added. Though ES2021/ES12 will be released next year, we can already have a look at what’s to come since many features already reached Stage 4(Finished) specification and will be included in the specification. In this article, I will discuss the features that have already reached stage four and are added to the Google Chrome V8 engine.

String.prototype.replaceAll

String.prototype.replace is an existing method that allows us to replace a pattern in a string with something else. One thing to remember in this method is that, when we replace a pattern, only the first occurrence of that pattern in the string would be replaced. …


Or Is It Synchronous?

Image for post
Image for post
Photo by bruce mars on Unsplash

The Problem

In React, we use setState() to update the state of any component. Now setState() does not immediately mutate this state, rather it creates a pending state transition. Accessing the state immediately after calling setState() returns the existing value and not the updated one. As beginners in React, I’m sure most of us would have often faced this problem.

There is no guarantee of synchronous operation on setState() and calls may be batched for performance gains. It is easy to forget that the setState() is asynchronous, making it tricky for us to debug issues in your code. The setState() also does not return a Promise. …


Here are a few JavaScript memes that I found hilarious

1. Many are not aware of the power of JavaScript

Image for post
Image for post

2. The spread operator joke never gets old

Image for post
Image for post

3. When in async, we wait…

Image for post
Image for post

4. For the devil that you can be

Image for post
Image for post

5. This meme reminds me about why “===” is important

Image for post
Image for post

6. Interpreted language, you say?

Image for post
Image for post

7. What would I do without “console.log”

Image for post
Image for post

8. JavaScript always manages to surprise me

Image for post
Image for post

9. Well, isn’t JavaScript powerful?

Image for post
Image for post

10. The mystery of “this” in JavaScript

Image for post
Image for post

I hope you could find at least some of the memes relatable. But hey, aren’t they chucklesome?

Laugh out loud and code intensely :)


Image for post
Image for post
Photo by Andy Li on Unsplash

JavaScript Modules are separated by files and loaded asynchronously. Exports are defined using the export keyword and imports are defined using import keyword.

While the basics of imports and exports are simple to understand, there are many other ways to work with ES Modules. In this article, we’ll go over all of the ways in which you can export and import within your modules.

Exports

We’ll be looking into three types of exports:

1. Default Export

Every module has a single default export, which represents the main value that is exported from that module. …


The safe way to access nested properties, even if a property doesn’t exist

Black and white house frame
Black and white house frame
Photo by Jordan M. Lomibao on Unsplash.

Introduction

As described in the MDN docs:

“The optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid.”

In other words, optional chaining with ?. is a safe way to access nested object properties — even if an intermediate property doesn’t exist.

Why Should I Use This?

An object can have a very different nested structure of objects. Working with data in JavaScript frequently involves situations where you aren’t sure that something exists.

Example

As an example, consider objects for app data. Most of our apps have an author in the app.author property with the first name app.author.firstName, …


Find out what’s changed in React Router

Reacter Router logo
Reacter Router logo
Logo from official repo

React Router is a collection of navigational components that are widely used in almost every React app. It is one of the most popular dependencies in React. The next major version(v6) is yet to be released. It’s still in the beta stage at the time of this writing. Since it’s always nice to explore new features, I’d like to share my thoughts and give you all a sneak peek of the upcoming features and changes to come.

Smaller Bundle Size

React Router v6 is a lot smaller than its predecessor. The size is actually reduced by 60%, which is a good thing. …


React’s first release in three years. What’s new?

Fireworks
Fireworks
Photo by Nicolas Tissot on Unsplash.

It has been around three years since React v16 was first released, and finally, the wait is over for the next major release. The React developer team promises that update v17 is incredibly important for the future of React, but it was also mentioned that no new features have been added. You might be wondering why it was released then.

In this article, I’ll be listing out the changes made in the latest version.

Why Are There No New Features?

React 17 is primarily focused on making it easier to upgrade React itself. Though it is unusual that there are no developer-facing features in this update, the main objective of this release is to make sure it is safe to embed a tree managed by one version of React inside a tree managed by another version of React. …

About

Harsha Vardhan

Engineer, Photographer, Tech Blogger. Builds products and writes for developers. I love to code and love to help others code :)

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