About the demo

This is a demo for Cortex, a javascript library for centrally managing data in React.

This app allows you to draw the city skyline. The City can have many Buildings. Each Building has many Floors. Each Floor has many Rooms, and each Room can have its light turned on or off. Click "Add Building" to create more buildings. Click on a building's base (with the plus sign) to add more floors, click on a floor to add more room, and click on the room to toggle its light. This demonstrates Cortex's power in a 4-level components architecture without using callbacks to communicate between parents and children. Check out the source here