In this blog we will talk about how an enhancer works and how it allows us to “create” a new Store Creator and “replace” the createStore function provided by Redux. ...Read more
Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions
This post was originally published on January 2, 2021 on my blog. In this moment, it's 3pm on the dot and I'm sitting in the lounge chair with a fire on the ...Read more
Coercion Coercion or type coercion is the implicit or automatic conversion of values from one data type to another. For example – number to string ...Read more
We recently analyzed the bundle size of our frontend application and noticed the Lodash package was taking up a significant amount of space. Lodash offers many useful utilities for common tasks like filtering, sorting, mapping and manipulating data. However, importing the entire library increases bundle size considerably. We decided to optimize our usage of Lodash to reduce this bundle size. Upon inspection, we found we were importing the whole library using imports like const lodash = require('lodash'); and const _ = require('lodash'); While convenient, this brings in all of Lodash's functions regardless of what we actually use. A better approach is to import only the specific functions needed. For example, using const merge = require('lodash/merge'); and const cloneDeep = require('lodash/cloneDeep'); We import just those individual methods rather than the entire library. This avoids unnecessary code and reduces bundle size. We also noticed imports like const { get } = require('lodash'); that destructure the get function. However, this still imports the whole Lodash library first before extracting the function. For even better optimization, we can import directly from the sub-module like const get ...Read more
Okay! So before starting we’ll make a promise to each other 😅 My Promise: I’ll try to explain Javascript Promises, in the best way possible! Your Promise: Read the complete blog! 😃 For ...Read more
I recently saw @matsuuu_ post about a fun cyber-punk themed subtitle text webcomponent he made. I loved this idea and it seemed like a similar element to MoAr ...Read more
Introduction Today, developers work in almost every sector of the economy. As the world gets increasingly digital, companies require more developers than ever to ...Read more