const preact = require('preact'); // components all the way down const Icon = name => ( {name} ); // the css attribute name `class` is reserved in js // so in react you have to call it `className` function Navbar() { const NAMES = ['Mashy', 'ntr']; return (
{NAMES.map(Icon)}
); // map is a function that is called on every element of an array // so in this ^^ case it calls Icon('Mashy') which returns some jsx // that gets put into the dom } module.exports = Navbar;