This repository demonstrates an uncommon bug in Tailwind CSS where hover effects fail to apply to elements added to the DOM after the initial render.
The provided index.js
file contains a simple React component that increments a counter. A button with a Tailwind CSS hover effect is used to trigger the increment. However, the hover effect only works reliably when the button is present from the initial page load. If you add a new button dynamically, the hover styles will not be applied correctly.
npm install
to install dependencies.npm start
to start the development server.