Raynos / mercury

A truly modular frontend framework
http://raynos.github.io/mercury/
MIT License
2.82k stars 143 forks source link

Communication between child components #190

Closed shoover closed 8 years ago

shoover commented 9 years ago

I was reading the mercury components doc and studying the black box aspect and how events are published for the parent to hook into.

Then I came across this line in the markdown demo:

editor.value(renderer.value.set);

Is that sort of going against the intent of mercury components by subscribing to a child component state value and piping new values to another child component state? If so, is it necessary in this context? I thought it would work without this line because both components and their values are all nested into mercury.structs, which should kick off the top-down rendering anyway.