What should I choose?

*It depends


Pure Rails

Pros

Great for building things quick

Provides easy to use utilities

Cons

Doesn't feel modern

Scales poorly

When?

New applications with fuzzy requirements

Prototype applications

Application you don't need to scale (one off contract jobs)

You can commit to doing it the "Rails way"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8160d121-89a2-443e-8117-7d77b4b15b43/rails.png


React + Rails

Pros

Way to manage JS Complexity

Provides an upgrade path from Pure Rails to React SPA

Cons

Can't move as fast as rails

Doesn't get the benefits of an SPA

More complex than either

When?

You have a Rails Application that is becoming extremely complex, and want to move towards an SPA

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1526154d-37b7-41fc-b81f-d117cbd9edda/React.js_logo-512.png


React SPA

Pros

Way to manage JS Complexity

Feels like a modern application

Enforced separation of concerns (Display / Business logic)

Improved client performance

Cons

Moves slower than Pure Rails (initially)

When?

You have a lot of Dynamic state on the page

You need it to feel modern

Have some reasonable confidence in needing to scale the application

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/6515bf90-22d0-4c0d-ab35-ef0cb2b946e9/react.png


Comparison

Resources