How to conditionally spread objects in Javascript

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:…

dynamically-inject-js-css-in-webpage

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…

react-query-auto-pull

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…

js-sort-set-by-value

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-fetch-options

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…

javascript-generators

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…

Javascript Intl.RelativeTimeFormat formatting

How to format dates with Intl.RelativeTimeFormat

The idea of Intl.RelativeTimeFormat is that it gives the ability to format to create an instance of relative time format function, with some pre defined settings or…

react-query-usemutation

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

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…