Saransh Kataria

How to sort a Set in JavaScript

How to sort a Set in JavaScript

  • November 26, 2022

ES6 introduced the set data structure in JavaScript. But sets are not ordered abstract data structures. So there is no .sort() property available on them. To sort a Set in JavaScript, we need to convert it into an array first. Since arrays are sortable, we will then sort them, and...

Debugging CSS scroll using one simple style

Debugging CSS scroll using one simple style

  • November 18, 2022

I have been doing a lot of complicated front-end work off lately and that always brings me back to the class conundrum of which element was adding a horizontal/vertical scroll to my page/elements. Debugging CSS scroll is a pain that I have felt too many times now and I always...

CSS :has a parent selector now

CSS :has a parent selector now

  • November 12, 2022

CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside an element. Often referred to as a parent seletor, the :has() function allows us to achieve this and more. Let us take a look at this relative selector. It only...

Using Font Awesome with React

Using Font Awesome with React

  • October 22, 2022

Font Awesome is a great resource to use various types of icons in your project including well-known social media icons and a lot more. It can be used with any front-end library. In this post, we are going to be using Font Awesome with React. Set up The first step...

The best domain for your applications

The best domain for your applications

  • October 18, 2022

Depending on the industry you are in, the domain that is best suited for you will vary. The ever-increasing popularity of mobile apps in different parts of our day-to-day lives, from measuring our heart rate to reminding us about important meetings, necessitated the creation of a new domain. The .app...

How to write comments in React (JSX)?

How to write comments in React (JSX)?

  • October 15, 2022

I was recently trying to comment out some logic inside my JSX to add context about what a potentially complex logic. I then realized that comments in JSX are weird. So, how to write comments in React (JSX)? You cannot use HTML comments because they are parsed as DOM nodes:...