JSFiddle - React, Tailwind, and code Playground
HTML
<li class="pro" name="text">
JavaScript
var theName = 'yourMom';
$('li.pro').attr('name', theName);
<li class="pro" name="text">
var theName = 'yourMom';
$('li.pro').attr('name', theName);