Learn ReactJS & React Native With Me
  • Home
  • React Native Series
  • React Js
  • Write for us
  • Animal Welfare
  • About Me
  • Contact
  • Home
  • React Native Series
  • React Js
  • Write for us
  • Animal Welfare
  • About Me
  • Contact
  • Facebook
  • Twitter
  • LinkedIn
  • Email
Learn ReactJS & React Native With Me

Code, Bugs, Pitfalls, Tricks of React Js & React Native

  • Home
  • React Native Series
  • React Js
  • Write for us
  • Animal Welfare
  • About Me
  • Contact

Browsing Tag

react js short

85 posts

export ‘Switch’ was not found in ‘react-router-dom’ – Code Example

  • Akash Mittal
  • August 30, 2022
In V6 of react-router-dom, the <Switch> component is deprecated against <Routes> component. So, you need to replace all the Switch with Routes otherwise you will get export ‘Switch’ (imported as…
View Post

no longer support global installation of Create React App – Code Example

  • Akash Mittal
  • August 30, 2022
React deprecated the global installation of create-react-app. Now you don’t even need to install create-react-app. Use npx to always get the latest version of create-react-app. Solution with Code Example First,…
View Post

namespace transformed `@babel/plugin-proposal-export-namespace-from

  • Akash Mittal
  • August 13, 2022
When running a react native application using cli, we sometimes get React Native error: Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from. This happens while using some plugins like react-native-reanimated.…
View Post

ReactDOM.render no longer supported. Use createRoot – Code Example

  • Akash Mittal
  • August 30, 2022
In this article I will provide you code to resolve Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. From React 18 ReactDOM.render() function is deprecated and…
View Post

ReactJS radio button – Code Example

  • Akash Mittal
  • August 30, 2022
In this article we will provide you code for ReactJs radio buttons. It will help you in defining radio button in JSX, group them, access onChange() event and take actions.…
View Post

Call javascript function from html – Code Example

  • Akash Mittal
  • August 30, 2022
To call a javascript function from html you need to use events like onclick(), onkeyup(), onmouseover() etc. and pass the javascript function as argument. Code Example – 1. Calling JS…
View Post

Convert binary to hexadecimal in JavaScript & ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
In this article we will provide you the code to convert a binary number to hexadecimal in Javascript & ReactJs. The process is to first convert the binary number to…
View Post

Convert decimal to binary in javascript & reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
To convert a decimal number to a binary number in javascript & reactjs, you can follow these steps – Take a empty string value to hold output. Run a loop…
View Post

Convert decimal to hexadecimal in javascript & reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
To convert a decimal number to hexadecimal in javascript and reactjs, use these steps – Run a loop till provided value become 0 Take mod by 16 and convert the…
View Post

Convert hexadecimal number into decimal in JS & Reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
To convert a hexadecimal number into decimal in javascript and reactjs, you can use parseInt() function with base 16. It will take care of provided data if it is in…
View Post

Convert binary number into decimal in javascript & Reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
To convert a binary number into decimal in javascript and reactjs, you can use parseInt() function with base 2. It can handle automatically if the number is provided in the…
View Post

Convert string into float in javascript & ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
Use parseFloat() function to covert string into float in javascript & ReactJs. The digit before decimal must start with a digit otherwise it will return NaN. Check the code example…
View Post

Handle divide by 0 properly in Javascript & ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
To handle divide by 0 properly in Javascript & ReactJs, you can use isFinite() function which returns true if the number is finite. Check this code – Source: MSDN
View Post

Check if value is number Javascript & ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
To check if the value is a number in Javascript & ReactJs, you can use isNaN() function. Check the code – Source: MSDN
View Post

Get Infinite number in JavaScript & ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
To get an infinite number in Javascript and ReactJs, you can use Infinity property of global scope. No number is greater than this. You can use it to compare a…
View Post

Create Array with null values in JavaScript & ReactJS – Code Example

  • Akash Mittal
  • August 30, 2022
To create an array of size n and having null values, you can use Array(n).fill(null) function. It works in both Javascript and ReactJs. Check out this code example – Example…
View Post

Create immutable copy of object in reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
To create immutable copy of object in reactjs, you can use Object.assign() method. This method is also used to create a copy of state object. Since states should not be…
View Post

Using constructor in class component reactjs – Code Example

  • Akash Mittal
  • August 30, 2022
React components can have state by setting this.state in their constructors. this.state should be considered as private to a React component that it’s defined in. In this article we are going to…
View Post

Passing data through props in reactJS – Code Example

  • Akash Mittal
  • August 30, 2022
Learn how you can pass data from one component to another through props in react js. Here we have declared two class components – Board and Square. We are passing…
View Post

Using Lists (UL/OL) in ReactJs – Code Example

  • Akash Mittal
  • August 30, 2022
In this article we are going to learn how to use unordered (UL) and ordered (OL) lists in JSX in React JS codes. Here is the example – Source: Reactjs…
View Post

Posts navigation

Previous 1 2 3 … 5 Next

Learn ReactJS & React Native With Me
Copyright AkashMittal.com | Privacy Policy