+ This is a counter list with ${counters.length} counters inside it!
+
+ ${counters.map((_, index) =>
+ child(
+ // This is the name of the counter. It has to match what you passed to withChild
+ 'counter',
+ // This is similar to key in react. It's used to keep track of the state of each counter.
+ // Using the index is usually bad practice
+ // You should probably use something like an id for it if you can
+ String(index),
+ // This is the input we pass to our sync functions. It has to match what we gave to withChild
+ index
+ )
+ )}
+
+
+ `;
+};
+```
+
+Now run your component with some initial state and you should see a counter element for each counter in the state!
+
+> Exercise: add an input element and a button allowing the creation of new counters
+
+## Output
+
+Outputs are like events. Let's say we want counters to have a "delete" button. To do that we need to allow the counter component to send messages to the counterList component. Let's start by defining the type of our messages:
+
+```ts
+type CounterOutput = 'delete';
+```
+
+Then let's edit the counter component to emit the output on click. For this the `raise` function is used:
+
+```ts
+const counterComponent = pipe(
+ ...,
+ withOutput