简体   繁体   English

我在 React 上尝试在我的待办事项列表上呈现过滤器功能时收到“未捕获的类型错误:未定义不是函数”

[英]I got an "Uncaught TypeError: undefined is not a function" while trying to render the filter functionality on my todo list on React

I got an "Uncaught TypeError: undefined is not a function" on the following line of code while trying to render the filter functionality on my todo list on React当我尝试在 React 上的待办事项列表上呈现过滤器功能时,我在以下代码行中收到“未捕获的类型错误:未定义不是函数”

.filter(FILTER_MAP[filter])
.map((task)=> (
  <Todo
    id={task.id}
    name={task.name}
    completed={task.completed}
    key={task.id}
    toggleTaskCompleted={toggleTaskCompleted}
    deleteTask={deleteTask}
    editTask={editTask}
  />
));```

just something wrong in key={task.id} and try to change只是 key={task.id} 有问题并尝试更改

key={task.key}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用语义ui react dropdown时出现`Uncaught TypeError:_this.ref.querySelector不是一个函数` - I got `Uncaught TypeError: _this.ref.querySelector is not a function` while using semantic ui react dropdown 未捕获的类型错误:无法读取未定义的属性“toLowerCase”(待办事项列表应用程序) - Uncaught TypeError: Cannot read property 'toLowerCase' of undefined (Todo list application ) (p5js/javascript) 尝试将 2 个对象传入函数时出错:Uncaught TypeError: object is undefined - (p5js/javascript) Got an error trying to pass in 2 objects into a function: Uncaught TypeError: object is undefined 未捕获的类型错误:todo.classList 未定义 - Uncaught TypeError: todo.classList is undefined Uncaught TypeError:使用.prepend()时undefined不是函数 - Uncaught TypeError: undefined is not a function while using .prepend() React.js:未被捕获的TypeError:undefined不是一个函数 - React.js : Uncaught TypeError: undefined is not a function 'Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'writeFile')' 尝试使用 REACT 写入文件时出错 - 'Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'writeFile')' error while trying to write to a file with REACT 未捕获的TypeError:未定义不是我的jQuery脚本中的函数 - Uncaught TypeError: undefined is not a function in my jQuery script reactjs待办事项列表-未捕获的TypeError:无法读取未定义的属性&#39;map&#39; - reactjs ToDo List- Uncaught TypeError: Cannot read property 'map' of undefined 未捕获的TypeError:undefined不是函数:/ - Uncaught TypeError: undefined is not a function :/
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM