I thought the advantage of modern JS frameworks was that you didn’t have to duplicate everything, but I see if I wanted to do this I still have to do it both in the JavaScript and totally differently in the Rails...

Ah, the advantages of self-install are already very obvious: