Building optimistic UI in Rails (and learn custom elements) | Rails Designer
05-Dec-2025 544
Custom elements are one of those web platform features that sound complicated but turn out to be surprisingly simple. If you have used Hotwire in Rails, you have already used them. Both and are custom elements. They are just HTML tags with JavaScript behavior attached.
This article walks through what custom elements are, how they compare to Stimulus controllers and how to build them yourself! Starting with a simple counter and ending with an optimistic form that updates instantly without waiting for the server. 🤯.
Building optimistic UI in Rails (and learn custom elements) | Rails Designer #ruby #rubydeveloper #rubyonrails #Building #optimistic #Rails #learn #custom #elements) #Rails #Designer https://rubyonrails.ba/link/building-optimistic-ui-in-rails-and-learn-custom-elements-rails-designer