Ask questionsTypeError: Object(...) is not a function

Do you want to request a feature or report a bug?

Bug 🐛🐛 (May be 🤔🙄)

What is the current behaviour?

I have created react functional component and implement state full logic using useState method but it throws an TypeError: Object(...) is not a function

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Installed packages

"dependencies": {
  "@reach/router": "^1.2.1",
  "formik": "^1.4.1",
  "prop-types": "^15.6.2",
  "react": "^16.7.0-alpha.2",
  "react-dom": "^16.7.0-alpha.2",
  "react-scripts": "2.1.1",
  "styled-components": "^4.1.3",
  "yup": "^0.26.6"

Github repository : Website: Screenshot: screenshot


Answer questions kami23

Hello , i have the same problem and the version of react that i am using is : "react": "^16.9.0", "react-dom": "^16.9.0", How to solve this ? i tried to use the next solution and it didn't work


Related questions

Disable react strict mode on third party libraries hot 6
Warning: Unknown DOM property for. Did you mean htmlFor? hot 6
Refs - "object is not extensible"
React@16.9 block `javascript:void(0);`
Warning: validateDOMNesting(...): <tr> cannot appear as a child of <table> hot 3
"DevTools v4 is incompatible with this version of React" with React Native & latest version of React hot 3
[ESLint] Feedback for 'exhaustive-deps' lint rule hot 3
React custom hook "Should have a queue. This is likely a bug in React" error message. hot 2
useEffect causes 'callback is not a function' exception hot 2
DevTools: Updating state or props in devtools does not trigger component update. hot 2
Infinite loop in useEffect using blank object or array hot 2
Error on unit test : Cannot read property 'Symbol(Symbol.iterator)' of undefined hot 2
False-positive security precaution warning (`javascript:` URLs) hot 2
Hooks API - hook breaks when exported from module hot 2
Function components do not support contextType. hot 2
Github User Rank List