Stimulus 1.1.1 to Stimulus 2.0.0 – practical cost

We just migrated Stimulus 1.1.1. to Stimulus 2.0.0 so I decided to share this with our whole team, but I thought this could be useful for the whole community.

The practical cost is that this migration could be done in a few minutes per Stimulus controller. 10-20 controllers – you should be done in less than a day.

Overview of the changes

Here are a few examples of the changes that were committed for a single _form.html.erb


# app/views/public_users_searches/_form.html.erb
-            target: "public-users-searches.term",
+            public_users_searches_target: "term",
-    <%= f.submit t(''), data: {target: "public-users-searches.commit", value: t('')} do %>
+    <%= f.submit t(''), data: {public_users_searches_target: "commit", value: t('')} do %>


If you are wondering whether you should migrate or not and how much it will cost probably you should migrate. It is not that expensive.