|
|
|
|
|
by mcintyre1994
1798 days ago
|
|
Why would you use JavaScript to write your HTML elements in the vanilla case? Surely you could just have a plain HTML checkbox and your default text, and then add an event handler to update the text when the checkbox changes? That’s how React with something like NextJS behaves, vanilla JS you get it for free unless you decide to use JS to write your elements like this. |
|