Cross out (strikethrough) text on click in React
Publish Date:2025/03/08 Author:JIYIK Category:React
-
-
To cross out text on click in React: Set an onClick attribute on the element. When the element is clicked, check if its text-decoration attribute is set. If the attribute is set, remove it, otherwise set it to line-through. const App =...
Full