How to conditionally spread objects in Javascript
Introduction In Javascript, If we want to spread an object into another one, we usually use the spread syntax operator (…) to do so. Like the following:…
How to dynamically inject JS/CSS into a webpage
Introduction Working with the new frontend tech stacks is fun, however, in some cases, it might be challenging there’s a need to host the frontend application in…
How to auto-pull data in React-Query
Introduction React-Query is a powerful tool for fetching/caching the data on the frontend side, yet working with React-Query might be a bit not straightforward, in this article…
How to sort Javascript Set by value
The Set object lets you store unique values of any type, whether primitive values or object references. To sort a Set by value: Get an array of the Set’s entries using…
React-Query: How to fetch queries conditionally
Introduction React-Query is a powerful tool for fetching/caching the data on the frontend side, in this article we’re going to demonstrate how we can fetch the queries…
Understand Javascript Generators
Javascript generators are under-appreciated, yet they are actually very useful and powerful, in this article, we will explore the basics and the power of javascript generators. Introduction…
React-Query useMutation with Jest Testing
Introduction React-Query is a powerful tool for fetching/caching the data on the frontend side, yet testing React-Query with Jest and React-testing-library might be a bit tricky, in…
How To Format Price With Currency In Javascript
In this article we’re going to explore Javascript Intl API INTL.FormatNumber and see how it can be used in order to format numbers and prices with/without decimal…