import { useState } from "react"
function App() {
const [color, setColor] = useState("olive")
return (
<div className="w-full h-screen duration-200"
style={{backgroundColor: color}}
></div>
)
}
export default App
Above code is not giving output.
I tried to change the background color but got the output with blank page.
2
Answers
It should work but your div dimensions are 0.
Is your
<App>
being rendered to a page element?