if you have "theories" at different level of detail, you can relate them. this kind of thing happens in mathematics too so it's unsurprising that Lean can handle that.
this lets you prove cross-cutting properties about them. for React, things like "a tree never tears" or "updates don't get stuck"