Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: onToggle is not a function at onDoubleClick #20

Open
meenalmalhotra opened this issue Oct 7, 2021 · 7 comments
Open

Comments

@meenalmalhotra
Copy link

I am stuck at 59 minutes 30 seconds of tutorial video. Following the same steps as the tutorial but getting an error when I double Click on the task: Uncaught TypeError: onToggle is not a function at onDoubleClick (Task.js:5).

Pls help asap. Thanks.

@gladiatorgiftson
Copy link

Can you share your GitHub link for the code most probably it will be name error

@Eugene-2018
Copy link

import {FaTimes} from 'react-icons/fa'
const Task = ({task, onDelete, onToggle}) => {
return (
<div
className= {task ${task.reminder ? 'reminder' : ''}}
onDoubleClick={()=> onToggle(task.id)}>


{task.text} <FaTimes style = {{color:'red', cursor:'pointer'}} onClick={() => onDelete (task.id)} />


{task.day}



)
}
export default Task
facing the same issue here

@gladiatorgiftson
Copy link

${task.reminder ? 'reminder' : ''}`} onDoubleClick={()=> onToggle(task.id)}>

onToggle is passed as props inside it refers to toggleReminder function on app.js so see if you passed it correctly on app.js

@tiusoro
Copy link

tiusoro commented Sep 2, 2022

Please any update on this....I am at this point and have experienced what you posted. Updates please. Thank you.

@tiusoro
Copy link

tiusoro commented Sep 2, 2022

${task.reminder ? 'reminder' : ''}`} onDoubleClick={()=> onToggle(task.id)}>

onToggle is passed as props inside it refers to toggleReminder function on app.js so see if you passed it correctly on app.js

It has been passed properly on app.js also done console.log and only sees the error: Uncaught TypeError: onToggle is not a function

@gladiatorgiftson
Copy link

${task.reminder ? 'reminder' : ''}`} onDoubleClick={()=> onToggle(task.id)}>
onToggle is passed as props inside it refers to toggleReminder function on app.js so see if you passed it correctly on app.js

It has been passed properly on app.js also done console.log and only sees the error: Uncaught TypeError: onToggle is not a function

can i get the repo link to check the issue

@tiusoro
Copy link

tiusoro commented Sep 3, 2022

https://github.com/tiusoro/tasktracker

${task.reminder ? 'reminder' : ''}`} onDoubleClick={()=> onToggle(task.id)}>
onToggle is passed as props inside it refers to toggleReminder function on app.js so see if you passed it correctly on app.js

It has been passed properly on app.js also done console.log and only sees the error: Uncaught TypeError: onToggle is not a function

can i get the repo link to check the issue

https://github.com/tiusoro/tasktracker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants