Observability
Observable
s support the ability to bind Observer
s to them. Observer
s receive an
update when the contents of the cell change. Observerable
s are both
Observable
s Observer
s.
Cells are Observerable
, which means you can chain them to each other to
publish and receive updates about changes in cell content.
Lets take a quick look:
Two-way binds are also supported for Observerable
s (which cells are):
Lets look at what Observer
s actually are:
They’re just a functional interface, this means you can use them for whatever you’d like, not just binding cells together.
Bindings involving LateInitCells and derivatives are fine between each-other, but bindings between LateInitCells and RefCells of a non-nullable type get complex.
Knowing that Observer
s are just functional interfaces, lets solve the issues
that arise when binding nullable to non-nullable cells.
Observers
can also be unbound:
Cool, that’s all for observability for now.