Notion.so features really nice modular blocks that can hold many different types of content, including other modular blocks. Everything that is typed, inserted, or edited is auto-saved and updated in realtime to other collaborators.
I got to thinking about what the best way to model the same recursively modular blocks in Firestore/NoSQL would be?
I would think that creating a block that holds references to other blocks would be the way to go. But I didn't know how that would impact performance with the extra roundtrips for querying the unknown number of references. On the other hand, storing data via duplication/denormalization that can be extremely deeply nested seems also problematic.