Write less and do more with JavaScript

Image by author

With JavaScript, you can do one thing in many different ways. Also, JavaScript is evolving with the release of every new ECMAScript specification, adding new useful methods and operators to make the code shorter, and somewhere more readable.

After offering ten JavaScript tricks, I’ve decided to share five more tricks…

The most powerful client-router for React yet

React-router is probably the most used package with React. Recently, a new stable version 6 is released with many new features. And personally, I think that this is the best version of react-router so far.

Installation

$ npm i react-router-dom@latest

Switch Is Replaced With Routes

The first major change in v6 is that the Switch component…

Haseeb Anwar

I keep things short and simple. Subscribe to get a story delivered to your inbox every week — haseebanwar.net

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