Photo by Dustin Scarpitti on Unsplash

Understanding NodeJS internally can be a little bit daunting (I know it was for me once). Node is a very powerful language and it can do a lot of things.

Today I wanted to uncover the power of Node’s built-in utility tool called fs (file system)

As per the fs docs:

The fs module provides an API for interacting with the file system in a manner closely modeled around standard POSIX functions.

Which is just a fancy way of saying that file system is a way in Node to interact with files for both read and write operations.

Now file…


Photo by Luca Bravo on Unsplash

What is this topic about?

If you are from a javascript background you might have heard the terms callback hell or async/await hell. It looks something like this:


Photo by MM Tey on Unsplash

Empathy is one of those things that can help in any part of life whether it’s your family, friends, that special person and even also at work. Understanding what empathy is and how it effects people took me long time. I struggle with human interactions and I am not ashamed to admit it, so I wanted to share my experience, as to what I have found from all of it.

I am full stack javascript developer. I love code. Javascript is my favorite language and for as long as I can remember I have considered my self as a one-man-army…


Photo by Pascal van de Vendel on Unsplash

So the React Conference just happened and as always something new happened. Hooks happened! The React team talked about suspense, lazy loading, concurrent rendering, and hooks :D.

Now I’ll talk about my favorite hook useReducer and how you use it.

In my PokemonInfo component, I have:

const [{ count, loading }, dispatch] = useReducer(reducer, initialState);

Which is equivalent to:

const [state, dispatch] = useReducer(reducer, initialState);
const { count, loading } = state;

So what is const [state, dispatch] = useReducer(param1, param2) Let’s first talk about array destructuring which is happening below.

const [state, dispatch] = useReducer(initialState);

Here’s an…


Photo by Dawid Zawiła on Unsplash

When I started out writing tests for my React application, it took me some tries before I figured out how to set up my testing environment using Jest & Enzyme. This tutorial assumes that you already have a React application set up with webpack & babel. We’ll continue from there.

This is part of a series of articles I have written. I talk about how to set up a React application for production the right and easy way.


Photo by madeleine ragsdale on Unsplash

A couple of days back Dan Abramov a member of react’s core team, made a tweet saying So now that we have Hooks do we also need Verses? and it turned into this awesome thread, in which people started replying with verses of Eminem’s song Lose youself, with some slight changes in the lyrics. I just had to put them up all in one place & make a compilation of them (I couldn’t help myself).

All the credits for this goes out to Ken Wheeler, Shawn Wang, Greg Blass, Josh Manders & Manoj Chandrashekar. Here it goes;

Look

If you…


A look at Prettier, ESLint, Husky, Lint-Staged and EditorConfig

Photo by Marco Xu on Unsplash

Learning to write good code, but you don’t know where to start… Going through style-guides like Airbnb’s Javascript Style Guide… Trying to write code with best practices...

Removing dead code? Finding unused variables in the code base? Trying to find problematic patterns in your code? Like, does it return or not?

Any of this sound familiar?

With so much to learn and do all at the same time, it is just so hectic.

Are you a Team Lead managing a diverse team? Do you have new developers on the team? Do you worry that they’ll write code not up to…


Photo by NeONBRAND on Unsplash

I previously wrote an article called How to conquer Webpack 4 and build a sweet React app.” Soon after I wrote the article, babel swooped in with a major breaking change and many of the packages got deprecated. So I decided to write a new tutorial.

I will focus on setting up webpack with react which will have .scss support along with code splitting

The purpose for writing this again is simple: I want everyone to feel comfortable. Because setting up webpack can be really daunting. Especially for new developers out there. …


Photo by Jack B on Unsplash https://unsplash.com/photos/Ltemss82iDs

One thing I hear quite often is “Let’s go for Redux” in our new React app. It helps you scale, and the App data shouldn’t be in React local state because it is inefficient. Or when you call an API and while the promise is pending, the component get unmounted and you get the following beautiful error.

Warning: Can’t call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

So the solution people usually arrive at is…


This article has been outdated with the new release for babel, kindly check the updated article “How to combine Webpack 4 and Babel 7 to create a fantastic React app”, last updated October 13th, 2018

Image credits http://pexels.com Porapak Apichodilok

In this article, I’ll go through how to set up a React application using Webpack 4. By the end of this tutorial, you’ll know on how to hot reload your application every time you press ctrl + s in your editor of choice.

I use Visual Studio Code (VS Code), and I love it. It is light weight, flexible, and the best part is it’s…

Adeel Imran

Software Engineer. I am a coffee & gym kinda guy. People that love dogs and pandas are best. Full Stack Dev @ RelayR

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