React, how to use if condition inside a div to change its className?
I am trying to get data using API and loop it for banner images. I got the data. And it is working fine. Here is the code to get the data. ///Retrieving data using API const [post, setPost] = useState(null); useEffect(() => { axios.get(global.url+’api/welcome’).then(response => { setPost(response.data); }); }, []); Now, I want to show… Read More React, how to use if condition inside a div to change its className?