Comment Comment by QuadrupleA Ugh, this is massively overcomplicating the vanilla js case.Just put the checkbox html & css on the page. Write a function that updates the label based on checked state. Call it on input/change events.It's like 3 lines of js.React.js people always invent this vanilla js / jQuery strawman that's so complicated and spaghetti that no mortal can possibly understand it.It's total BS. You can write succinct maintainable code without a 100 lb framework. parent QuadrupleA 5 years ago
Just put the checkbox html & css on the page. Write a function that updates the label based on checked state. Call it on input/change events.
It's like 3 lines of js.
React.js people always invent this vanilla js / jQuery strawman that's so complicated and spaghetti that no mortal can possibly understand it.
It's total BS. You can write succinct maintainable code without a 100 lb framework.