This repository demonstrates an uncommon bug where Tailwind CSS classes fail to apply when an event handler (e.g., onClick
) is assigned an arrow function within an object's method definition within a functional component.
The problem arises when an event handler method, defined as an arrow function within an object, is used as a prop for an HTML element inside a functional component that employs Tailwind CSS.
npm install
to install necessary packages.npm start
to start the development server.The solution involves using a regular function or binding the context of the arrow function method.