Hello guys,
i use to develop monolith apps with several namespaces including api (for mobile apps). In front i just use ERB with turbo, hotwire and sometimes stimulus. I also use some jquery code but i'm wondering a lot of people arround are using react, vue or angular. What could be the reason for this?
Thanks
Fast forward to today, and that isn't the case much anymore. Today, with Stimulus and Turbo, we are able to create rich interactions on the front end. Even with Turbo alone (with streams and frames) we can accomplish a lot of rich interactions without needing to write any javascript ourselves. While some may benefit from using a heavier frontend framework like React, Vue or Angular, the benefits are fewer and fewer today than they were back then.
Perhaps if there was a larger company who had a whole department around design and frontend stuff, it could still make sense to use React and the Ruby on Rails side was simply providing an API. But often enough, this isn't the case for small to medium size companies (and even a lot of large ones). I've seen some medium sized companies today that are still stuck in this mindset that Ruby on Rails cannot handle rich interactions and they're still developing Rails/Frontend Framework(Angular/Vue/React) together on the same team and their velocity is slower than had they stuck with what Rails provides today. Another benefit is that there is a vast library of existing components for React that could be appealing to some to use those instead of having to create their own implementations.
Regardless, on a new application, my preferred route is the "Rails Way" using what is provided by default. Over the past several years (ever since Stimulus was released), I lost any desire to explore frontend frameworks and with the release of Turbo, this was solidified.
turbo:after-stream-render event in turbo. This ias a major issue for me since i use several jquery based libraries.
I've ran across some of the issues that you're describing too. Specifically, when there is something like ChosenJS that you want to have rendered from a Stimulus controller, but cannot invoke the chosen() function because of the whole jquery stuff. Some of the solutions in the link above could help address these issues, but what I've done in the past is work towards moving away from the jquery libraries in favor of something with vanilla JS. However, I can empathize with people who have heavily invested in one JS library that is used throughout their application.
Honestly, I would explore these two routes first before jumping to a React Native approach.
PS: It is a banking app