While cupcakes are cooling, prepare frosting. In the bowl of a stand mixer fitted with the paddle attachment, beat butter until smooth. In a separate bowl, whisk together cocoa powder, sugar and salt. Add half of the cocoa mixture to the butter and beat until combined. Slowly add root beer to running mixer set to low speed until incorporated. Add the rest of the cocoa mixture and beat frosting until smooth and fluffy. If you want your frosting to be thinner, add a little bit of milk or cream to thin it out. Pipe frosting onto cooled cupcakes and serve.