const App=()=>{
const [name,setname] =useState([]);
const [post,setpost] =useState([]);
const fetchData=()=>{
const APIone='https://jsonplaceholder.typicode.com/posts';
const APItwo='https://jsonplaceholder.typicode.com/comments';
const get_api_one=axios.get(API_one);
const get_api_two=axios.get(API_two);
axios.all([get_api_one,get_api_two]).then(
axios.spread((...allData)=>{
const alldatapost=allData[0]
const alldatacomment=allData[1]
console.log(alldatapost);
console.log(alldatacomment);
})
)
}
useEffect(()=>{
fetchData()
},[])
I am facing datadisplay issue with following code which i want to display on screen using flatlist