3 ms·
Yes, this is what I meant. Because you want to listen to attribute changes. Anyway, I was saying it's a good thing. I've built entire complex apps where I pass
by jongjong 1y ago
Yes, this is what I meant. Because you want to listen to attribute changes. Anyway, I was saying it's a good thing. I've built entire complex apps where I pass everything via HTML element attributes; it has made me think about architecture and separation-of-concerns in a specific way which has been really good in terms of increasing transparancy/observability and keeping the code simple.
Simple interfaces are critical for good architecture. Forcing everything to be a string, forces pass-by-value and forces minimal communication between components. You get maximum separation of concerns; high cohesion, loose coupling.
I know exactly what inputs each component is dealing with by just looking at the HTML. This is incredibly useful... And components can output stuff by dispatching events on themselves (with bubbling for important events which may potentially affect higher level components).