React, how to use if condition inside a div to change its className?

Advertisements 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… Read More React, how to use if condition inside a div to change its className?

how to write good anchors in react.js

Advertisements I had code in react js but the are problem to write anchor with href . form example this below code import React from "react"; function Browser() { return ( <div> <section className="flex bg-gray-100 py-16 px-4" id="browse-the-room"> <div className="container mx-auto"> <div className="flex flex-start mb-4"> <h3 className="text-2xl capitalize font-semibold"> browse the room <br className="" />… Read More how to write good anchors in react.js