Carefully Choose One Framework
Explore how to carefully select one JavaScript framework for your Rails app to ensure long-term sustainability and easier maintenance. Understand criteria like organizational support, team preference, and compatibility with Rails to make informed decisions. Learn why limiting to one framework reduces complexity and helps your app evolve smoothly.
We'll cover the following...
While any dependency added to our app should be carefully considered, the front-end framework should be considered most carefully. JavaScript is a more serious liability, and a large framework like React or Ember exacerbates this problem. This means two things: first, we should try to have exactly one front-end framework in our app to minimize the carrying cost, and second, we should carefully choose the framework for sustainability.
If we have no other constraints, Rails’ default of Hotwire is a good choice, but React is also something to consider. Let’s take this lesson to see why and how it relates to ...