If they are JS frameworks that enable other engineers to build applications that support farms, and banks, and taxi services and insurance companies and mines and factories, etc. then obviously that is productive.
If someone is willingly paying money for their labor then I see little point in questioning the worth of that exchange.
When JS engineers start asking for public money to support them writing JS frameworks that no one wants to pay for, we can revisit this topic.