DEV Community

Anjali Gurjar
Anjali Gurjar

Posted on

React Interview

import {useState,useEffect} from 'react'

const FakeApi=() => new Promise((resolve)=>{
setTimeout(()=>{
resolve([{
id:1,
name:"ANjali",
age:12,

    },
             {
                 id:1,
        name:"Addu",
        age:12,
             }
            ])
},3000)
Enter fullscreen mode Exit fullscreen mode

});

export default function App() {

const [data,setdata]=useState([]);
useEffect(()=>{
const fetchresult=async()=>{
const result=await FakeApi()
setdata(result)

}
fetchresult()
Enter fullscreen mode Exit fullscreen mode

},[])

return (

























{data.map((item) => {

return (



)

})}




id name age
{item.id} {item.name} {item.age}




)

}

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more