import { Fragment, useState } from "react";
const Login = () =>{
const [data,setData] = useState([]); // step 1 create useState
// An obj to push
const obj = {
name:"manojconcept",
age:"unlimited"
}
// Adding HandleClick function
const handClick = () =>{
setData([...data,obj]) // by using spread operator
}
return(
<>
<button onClick={handClick}>
click Me
</button>
{
data.map((ele,ind)=>{
return(
<Fragment key={ind}>
<p>
{ele.name}
</p>
<p>
{ele.age}
</p>
</Fragment>
)
})
}
</>
)
}
export default Login;
Quadratic AI – The Spreadsheet with AI, Code, and Connections
- AI-Powered Insights: Ask questions in plain English and get instant visualizations
- Multi-Language Support: Seamlessly switch between Python, SQL, and JavaScript in one workspace
- Zero Setup Required: Connect to databases or drag-and-drop files straight from your browser
- Live Collaboration: Work together in real-time, no matter where your team is located
- Beyond Formulas: Tackle complex analysis that traditional spreadsheets can't handle
Get started for free.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)