fetching data from API in react poll
问题 I want to fetch data from API and show frontend using react but I am getting error from frontend side which is (TypeError: answers.map is not a function ) so how can I solve this error -- MY CODE IS - import React, { useState, useEffect } from "react"; import Poll from "react-polls"; import { getPolls } from "../helper/coreapicalls"; const MainPoll = () => { const [polls, setPoll] = useState([]); const [error, seterror] = useState(false); // Setting answers to state to reload the component