|
|
|
|
|
by Py_
896 days ago
|
|
Example author here. I have to say this is a bit disingenuous. You pulled the segmented button component which in a real-world environment would just be a part of a library. You should show the part where it gets used. From my experience, how this ends up playing out in a real-world environment is that these things end up getting boxed into higher-level UI libraries that turn all this stuff into quick function calls. The vast majority of devs aren't (and shouldn't be) writing their own custom components. |
|
Component frameworks are for doing exactly that, and they generally make it pretty easy, with no manual DOM manipulation required when state changes.
Rather than continue with my salty commentary, I suggest to anyone still reading to look at any other file in the example project and draw their own conclusions: https://github.com/squaresapp/rawjs-sample