(For comparison, in React you can pass the state down as props from a common ancestor, and in Clojure frameworks all app state is in a giant object referenced by components as needed.)
(For comparison, in React you can pass the state down as props from a common ancestor, and in Clojure frameworks all app state is in a giant object referenced by components as needed.)
How do you pass the state between an input button and a label?
Whatever technique you choose to do that (including react!) you can use it with web components.
Some frameworks like react though also solve the componentization problem, so since web components are not necessary there (and weren't ready yet when react first came out), they tend to not get used to react and friends, even if they would technically work.
An example of this would be a radio-group and radio-element. When an element is clicked it fires a "clicked" event to the parent radio-group. The radio-group then toggles on "selected" for the clicked element, and removes the previously selected element's "selected" attribute.
I recently took the time to explore a new idea I haven’t seen explored before —- services as DOM elements:
https://www.vadosware.io/post/sade-pattern-services-as-dom-e...
Straight to the repo:
https://gitlab.com/mrman/services-as-dom-elements
The idea is simple, use references to get at other DOM elements that happen to act like whatever kind of store you need