You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A'm stuck at 1:12:52 at Submit function onAdd. There is an error in React as:
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
React 2
AddTask AddTask.js:4
onSubmit AddTask.js:14
React 14
unstable_runWithPriority scheduler.development.js:468
React 15
js index.js:7
js main.chunk.js:1172
Webpack 7
Would you mind sharing the code in the app.js file?
Also like the error states, in the package.json file verify if 'react' and 'react-dom' have the same version and if react-dom is >16.8.0.
A'm stuck at 1:12:52 at Submit function onAdd. There is an error in React as:
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
React 2
AddTask AddTask.js:4
onSubmit AddTask.js:14
React 14
unstable_runWithPriority scheduler.development.js:468
React 15
js index.js:7
js main.chunk.js:1172
Webpack 7
The code is AddTask.js:
`
import { useState } from 'react'
const AddTask = ({ onAdd }) => {
const [text, setText] = useState([])
const [day, setDay] = useState([])
const [reminder, setReminder] = useState([false])
}
export default AddTask
`
Please help me to resolve this issue.
The text was updated successfully, but these errors were encountered: