How can I use dynamic css variables in react?

Trying to do a drop-shadow hover effect in react. I thought I’d use inline style attribute so each icon can have a different color when it’s hovered over. I’m stuck on how to achieve this. In my IconGrid component I’ve created an array of objects, each has an image and the image color respectively. Then… Read More How can I use dynamic css variables in react?

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?

how to write good anchors in react.js

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="" /> that… Read More how to write good anchors in react.js