React router dom – get current route using useLocation hook provided by v5.1 library. It will return all the properties which you get from window.location in javascript. Complete code –…
To convert a number from decimal to binary, you can use (num >>> 0).toString(2). This will work in JavaScript, JQuery, React, React Native, VueJs and every other javascript variant framework…
It is essential to convert a string to a number in javascript in order to do arithmetic calculations on them. Sometimes when we fetch data from database, the numeric values…
To uppercase the first letter of a string in JavaScript, we can use toUpperCase() method. But it will convert the whole string to upper case. To selectively convert the first…
You can redirect to an external link in react router dom from Component prop of Route. As you know, you can load a component for a route by declaring it…
It is important to know how to check react version in order to keep the libraries and packages up to date. You can check the react and react-native versions either…
If you are wondering how to compare chars in java, then this article is for you. There are various ways to compare characters in Java language. We can either define…
You should know how to clear java cache because temporary java files can impact the browser’s performance as well as show outdated content. By clearing the cache, we can force…
Many beginners get confused as how to print a blank line in Python? It’s done by using print() function. You may either pass no parameter, or empty single/double quotes or…
In order to know how to end program in Java, you should be aware that calling return with in a function doesn’t end it. You need to use System.exit(0) command…
In order to use bootstrap in React Js, you will need to first install the npm bootstrap package. You will also need to install the react supported bootstrap package. Step…
This article will help you to know how to use React JS in web applications. React js creates static websites with optimized performance and speed. Step 1: Install create-react-app npm…
In React Native background color can be applied using background-color css property. The only difference is that we need to use camel case as backgroundColor. Check out the code –…