Preheat the oven to 180 C (350 F).
Place the hazelnuts on a sheet pan and toast in the oven for 10-12 minutes, or until they are very fragrant and you can see their essential oils coming out. Take care to not let them burn. If they have skins, rub the nuts with a clean kitchen towel once they are cool enough to handle. The skins should come off easily. Let cool. Chop the nuts coarsely by hand or pulse in a food processor and set aside.
Turn the oven down to 150 C (300 F). Line a sheet pan with parchment paper and set aside.
Place the egg whites in the bowl of a standing mixer or in a bowl with the salt. Whip the whites with the whisk attachment in the mixer or with a handheld mixer until you have soft peaks. Once you have done so, add the sugar, a little at a time. Next, if making chocolate cookies, sift in the cocoa at this time. Gently fold in the nuts in batches.
Next, place the mixture in a small saucepan and place over medium-low heat. Cook the mixture gently for 5 minutes at this heat, stirring slowly the entire time. After 5 minutes, lower the flame to the lowest setting and stir another 5-7 minutes until the mixture has thickened and turns a beige color. You will need to stir more vigorously in the second half of the cooking time to prevent the batter from sticking. When it is ready, it will pull away from the sides of the pan. Turn off the heat and add the vanilla.
Quickly remove the mixture into a bowl to stop the cooking. Using two large spoons, place dollops of the mixture onto the sheet pan. I make 12 large cookies but you can make them smaller. Bake in the oven for 20-25 minutes, depending on your oven and the size of your cookies. They will be cooked entirely on the outside but remain soft inside. They will continue to cook as they cool. Store after cooled in an airtight container for up to 2 weeks.
