A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
6.38k
stars
1.16k
forks
source link
Cannot read properties of undefined (reading 'target') while tying in input #1399
Open
rameshkondra opened 9 months ago
`import React, { useState } from "react"; import "../Styles/Todos.css";
function Todos() { const [task, setTask] = useState(""); const [todos, setTodos] = useState([]);
let onInputEnter = (e) => { setTask(e.target.value); };
let onSubmitHandler = (e) => { e.preventDefault(); let newTodos = [...todos, task]; setTodos(newTodos); setTask(""); };
let deleteHandler = (indexValue) => { let newTodos = todos.filter((todo, index) => index !== indexValue); setTodos(newTodos); };
return (
Todos Application using React js
{todos.map((todos, index) => { return ({todos} {" "}
); }
export default Todos; `