I am writing this for the senior engineer or tech lead that is deciding whether to use Hotwire or a Frontend framework (e.g. React, Vue, Svelte …) for the frontend portion of the next Rails project. If this is you, read on. The key factor You have already gone over the usual list of factors that you consider for every new project no matter what tech stack it is on: the expertise of your team members, technologies used on existing projects at your company, available libraries or ready solutions. These are table stakes, you’ve considered them like you always do and for this project, they’re not pointing either way. I will make a case that, once those fundamental questions are cleared, there is one that is specific to this decision and stands above all others: How is the complexity of the project distributed between shared state management and visual interactions? Most of the cost of software is in maintenance and most of the cost of maintenance comes from the complexity of our solution. Picking a tech stack that is well suited for managing the kind of complexity you are facing will make it easier to keep the complexity under control. The point will become clearer once we consider the two extremes.
Frontend
Javascript
Ruby on Rails
Added: 18 Jan 2024