Resolving undefined errors while using map function in jsx.
If you are calling an api and stored data in useState. sometimes you may get an error called 'undefined' when you use map in your jsx.
ex: const [responseData, setResposeData] = useState();
axios.get('http://url').then(resp => {
setResposeData...
reactonme.hashnode.dev1 min read