speculative nonfiction
Recursion is too easy for writing nested menus in UI
When paired with component-based framework tools and HTML’s unordered lists. Since the rendering is done by the framework, we simply need to progressively stack render calls as we traverse the data. Such brutalist Dada.
function List({ items }) {
return items.map((item) => (
- {item.name}
{item.children &&
}
));
}
Sunday July 12, 2020