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

reactjs error

34 posts

Type ‘{}’ is not assignable to type ‘ReactNode’ module not used as JSX

  • Akash Mittal
  • November 13, 2022
module cannot be used as a JSX component; Type ‘{}’ is not assignable to type ‘ReactNode’ because React 18 has some breaking changes like ReactDOM.render() is deprecated. You need to…
View Post

TypeError: this.getOptions is not a function – Code Example

  • Akash Mittal
  • October 17, 2022
If you are using less-loader v8.0.0 or sass-loader v11.0.0 along with webpack version <5 then you will encounter “TypeError: this.getOptions is not a function” error. This is because from v8…
View Post

error:0308010C:digital envelope routines::unsupported – Code Example

  • Akash Mittal
  • October 17, 2022
Openssl has removed support from insecure protocols. But some of the packages in nodejs are still using them. Due to this they are throwing 0308010C:digital envelope routines::unsupported error. In this…
View Post

Uncaught ReferenceError: process is not defined ReactJS – Code Example

  • Akash Mittal
  • August 30, 2022
React-Scripts throws the error Uncaught ReferenceError: process is not defined due to it’s dependency on react-error-overlay. The dependencies of react-error-overlay got updated to support webpack V5 which is not compatible…
View Post

Component not re-rendering on array state change – Code Example

  • Akash Mittal
  • September 5, 2022
Array is referenced through it’s memory location. This location doesn’t change when there is some update over array. A react state takes this location. But since the location doesn’t change…
View Post

React Hook “useEffect” is called conditionally – Code Example

  • Akash Mittal
  • August 30, 2022
React hooks are needed to be executed in the same order as they are defined. This should happen at each render of the component. But if you use hooks like…
View Post

component is changing controlled input to be uncontrolled – Code Example

  • Akash Mittal
  • August 30, 2022
A controlled input is run by state. If this state gets undefined then the controlled input becomes uncontrolled and you will get the warning: A component is changing a controlled…
View Post

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

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

React.Children.only expected to receive a single React element child

  • Akash Mittal
  • September 5, 2022
One day I was working on my React-Native project and got this weird error, “React.Children.only expected to receive a single React element child“. Everything seemed perfectly alright with the code…
View Post

‘React’ must be in scope when using JSX react/react-in-jsx-scope

  • Akash Mittal
  • July 9, 2021
React js throws the error, ‘React’ must be in scope when using JSX react/react-in-jsx-scope, when either we forget to include React in our script or make a spelling mistake. This…
View Post

How to create for loop inside React JSX?

  • Akash Mittal
  • September 5, 2022
Yes you an create a for loop inside react JSX with the help of function callback approach. In fact, you can run any code within JSX using this approach. But…
View Post

React-router urls don’t work on browser refresh or entered manually

  • Akash Mittal
  • March 22, 2021
If your react router urls don’t work on browser refresh or when entered manually, then it means you have not configured paths on your server. Simply point all the urls…
View Post

How to navigate in React Router programmatically?

  • Akash Mittal
  • September 5, 2022
This is a common use case when we want to navigate in React router programmatically without using Link or NavLink components. There are many ways of doing that but since…
View Post

.map is not a function

  • Akash Mittal
  • September 5, 2022
map() can only be used with Arrays. So, if you are getting error .map is not a function, you are probably using it on either the objects or other variables…
View Post

A router may have only one child element – React Router Dom Error

  • Akash Mittal
  • February 26, 2021
React router dom throws the error that a router may have only one child element if more than 1 routes are defined without enclosing them in div or switch. Generally,…
View Post

com.android.ide.common.process.processexception: failed to execute aapt

  • Akash Mittal
  • February 26, 2021
Android throws the error com.android.ide.common.process.processexception: failed to execute aapt when it is not able to recognize AAPT. This is react native and ionic error. To solve this issue either recreate…
View Post

Component definition is missing display name – React Native Error

  • Akash Mittal
  • February 26, 2021
React native throws error component definition is missing display name, when an anonymous function is exported. This is a ESLint warning because although you can work with anonymous functions, it…
View Post

cannot add a child that doesn’t have a yoganode – React Native Error

  • Akash Mittal
  • September 5, 2022
As the error (cannot add a child that doesn’t have a yoganode) indicates, there is some node which is not a valid element. This is the problem but could arise…
View Post

error: enoent: no such file or directory, uv_cwd – React Native Error

  • Akash Mittal
  • February 26, 2021
React native throws error: enoent: no such file or directory, uv_cwd, when you update file names or project name or delete some folder. This is a common error which requires…
View Post

Posts navigation

1 2 Next

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