Computer Science, asked by preetshokeen0001, 2 months ago

import React, { useState } from 'react'
import { Button , TextField , FormControl} from '@material-ui/core';

export default function App() {
const [todos, set_todos] = useState([])
const [input, set_input] = useState()
const new_todo = (event) => {
event.preventDefault();
set_todos([...todos, input]);
set_input([])
}
return (
<>
todo-it

set_input(event.target.value)} />
add todo



{todos.map(todo => (
{todo}
))}



)
}




can anyone tell why is the button not disabling this is react.js

todo app

Answers

Answered by aviranjan35
2

Answer:

import React, { useState } from 'react'

import { Button , TextField , FormControl} from '@material-ui/core';

export default function App() {

const [todos, set_todos] = useState([])

const [input, set_input] = useState()

const new_todo = (event) => {

event.preventDefault();

set_todos([...todos, input]);

set_input([])

}

return (

<>

todo-it

set_input(event.target.value)} />

add todo

{todos.map(todo => (

{todo}

))}

)

}

can anyone tell why is the button not disabling this is react.js

todo app

Answered by satyamkumarks38
1

Answer:

Mujhe yah prashn nahin aata hai dost maaf kar dena mujhe Mujhe free ke point chahie Kuchh Dinon Tak

Similar questions